diff options
Diffstat (limited to 'src/tikzit.cpp')
-rw-r--r-- | src/tikzit.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tikzit.cpp b/src/tikzit.cpp index 8569817..a286630 100644 --- a/src/tikzit.cpp +++ b/src/tikzit.cpp @@ -21,6 +21,7 @@ #include "tikzstyles.h" #include "previewwindow.h" #include "latexprocess.h" +#include "util.h" #include <QFile> #include <QFileDialog> @@ -47,6 +48,7 @@ void Tikzit::init() QSettings settings("tikzit", "tikzit"); initColors(); + initTexConstants(); _mainMenu = new MainMenu(); QMainWindow *dummy = new QMainWindow(); @@ -61,6 +63,7 @@ void Tikzit::init() //_stylePalette->show(); _windows << new MainWindow(); _windows[0]->show(); + _windows[0]->restorePosition(); _styleFile = ""; _styleFilePath = ""; @@ -187,6 +190,7 @@ void Tikzit::newDoc() { MainWindow *w = new MainWindow(); w->show(); + w->restorePosition(); _windows << w; } @@ -250,6 +254,7 @@ void Tikzit::open(QString fileName) MainWindow *w = new MainWindow(); _windows << w; w->show(); + w->restorePosition(); w->open(fileName); } } @@ -437,7 +442,12 @@ void Tikzit::makePreview() } else { _latex->makePreview(activeWindow()->tikzSource()); } + _preview->show(); + + // restores position from settings the first time this is called, otherwise + // do nothing. + _preview->restorePosition(); _preview->raise(); } } |