summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tikzit/src/common/tikzparser.ym7
1 files changed, 6 insertions, 1 deletions
diff --git a/tikzit/src/common/tikzparser.ym b/tikzit/src/common/tikzparser.ym
index cf9205c..85a0fe0 100644
--- a/tikzit/src/common/tikzparser.ym
+++ b/tikzit/src/common/tikzparser.ym
@@ -107,7 +107,12 @@ void yyerror(YYLTYPE *yylloc, TikzGraphAssembler *assembler, const char *str) {
%%
-tikzpicture: "\\begin{tikzpicture}" optproperties tikzcmds "\\end{tikzpicture}";
+tikzpicture: "\\begin{tikzpicture}" optproperties tikzcmds "\\end{tikzpicture}"
+ {
+ if ($2) {
+ [[assembler graph] setData:$2];
+ }
+ };
tikzcmds: tikzcmds tikzcmd | ;
tikzcmd: node | edge | boundingbox | ignore;