diff options
Diffstat (limited to 'src/tikzit.cpp')
-rw-r--r-- | src/tikzit.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tikzit.cpp b/src/tikzit.cpp index 2a7c00a..06777d1 100644 --- a/src/tikzit.cpp +++ b/src/tikzit.cpp @@ -429,7 +429,14 @@ void Tikzit::makePreview() } connect(_latex, SIGNAL(previewFinished()), this, SLOT(cleanupLatex())); - _latex->makePreview(activeWindow()->tikzSource()); + + if (activeWindow()->tikzDocument()->isEmpty()) { + _latex->makePreview("\\begin{tikzpicture}\n" + " \\node [style=none] (0) at (0,0) {};\n" + "\\end{tikzpicture}\n"); + } else { + _latex->makePreview(activeWindow()->tikzSource()); + } _preview->show(); } } |