Skip to content

Commit

Permalink
GUI - remember position of doc split
Browse files Browse the repository at this point in the history
  • Loading branch information
samaaron committed Jul 30, 2015
1 parent bd5c37e commit 3e26dab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/gui/qt/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,11 @@ MainWindow::MainWindow(QApplication &app, bool i18n, QSplashScreen* splash)

addUniversalCopyShortcuts(docPane);

QSplitter *docsplit = new QSplitter;
docsplit = new QSplitter;

docsplit->addWidget(docsCentral);
docsplit->addWidget(docPane);



docWidget = new QDockWidget(tr("Help"), this);
docWidget->setFocusPolicy(Qt::NoFocus);
docWidget->setAllowedAreas(Qt::BottomDockWidgetArea);
Expand Down Expand Up @@ -1976,6 +1974,7 @@ void MainWindow::readSettings() {
workspaces[w]->zoomTo(zoom);
}

docsplit->restoreState(settings.value("docsplitState").toByteArray());

restoreState(settings.value("windowState").toByteArray());

Expand Down Expand Up @@ -2012,6 +2011,7 @@ void MainWindow::writeSettings()
workspaces[w]->property("zoom"));
}

settings.setValue("docsplitState", docsplit->saveState());
settings.setValue("windowState", saveState());
}

Expand Down
3 changes: 3 additions & 0 deletions app/gui/qt/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QSplitter>
#include <QDate>
#include <QMainWindow>
#include <QDialog>
Expand Down Expand Up @@ -157,6 +158,7 @@ private slots:
void open_sonic_pi_net();

private:

QSignalMapper *signalMapper;
void startServer();
void waitForServiceSync();
Expand Down Expand Up @@ -281,6 +283,7 @@ private slots:
QString latest_version;
int latest_version_num;

QSplitter *docsplit;

};

Expand Down

0 comments on commit 3e26dab

Please sign in to comment.