summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cc4
-rw-r--r--src/mainwindow.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 298c811..1b7b37b 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -49,7 +49,7 @@ MainWindow::MainWindow(QString p)
// this, SLOT(reset()));
//watcher.addPath(program);
- QSplitter *splitter = new QSplitter();
+ splitter = new QSplitter();
setCentralWidget(splitter);
editor = new CodeEditor();
@@ -159,6 +159,7 @@ void MainWindow::loadSettings()
settings.beginGroup("MainWindow");
state = settings.value("state").toByteArray();
geometry = settings.value("geometry").toByteArray();
+ splitter->restoreState(settings.value("splitter").toByteArray());
settings.endGroup();
settings.beginGroup("Canvas");
@@ -176,6 +177,7 @@ void MainWindow::saveSettings()
settings.beginGroup("MainWindow");
settings.setValue("state", saveState());
settings.setValue("geometry", saveGeometry());
+ settings.setValue("splitter", splitter->saveState());
settings.endGroup();
settings.beginGroup("Canvas");
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 2be4731..5311c68 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -35,6 +35,8 @@
#include "outputwindow.h"
#include "luascript.h"
+class QSplitter;
+
class MainWindow
: public QMainWindow
{
@@ -71,6 +73,7 @@ private:
bool dirty{false};
QAction* act_save;
CodeEditor *editor;
+ QSplitter *splitter;
QFileSystemWatcher watcher;
QString program;