summaryrefslogtreecommitdiff
path: root/src/tikzit.cpp
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2019-01-25 14:56:15 +0100
committerAleks Kissinger <aleks0@gmail.com>2019-01-25 14:56:15 +0100
commitce94cb38ec38ce5a304b3bab1b9a2d903e1d15e9 (patch)
treeb2906ef71a1cc3ee1be8ab8aa4fb7ba7f73291a2 /src/tikzit.cpp
parent0755b73637711e803069da01560df9e491dd7d51 (diff)
set window geometry after showing it for the first time
Diffstat (limited to 'src/tikzit.cpp')
-rw-r--r--src/tikzit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tikzit.cpp b/src/tikzit.cpp
index 8569817..f2ad661 100644
--- a/src/tikzit.cpp
+++ b/src/tikzit.cpp
@@ -61,6 +61,7 @@ void Tikzit::init()
//_stylePalette->show();
_windows << new MainWindow();
_windows[0]->show();
+ _windows[0]->restorePosition();
_styleFile = "";
_styleFilePath = "";
@@ -187,6 +188,7 @@ void Tikzit::newDoc()
{
MainWindow *w = new MainWindow();
w->show();
+ w->restorePosition();
_windows << w;
}
@@ -250,6 +252,7 @@ void Tikzit::open(QString fileName)
MainWindow *w = new MainWindow();
_windows << w;
w->show();
+ w->restorePosition();
w->open(fileName);
}
}
@@ -437,7 +440,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();
}
}