Don't set the state if it's the same

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-02-10 15:22:14 -02:00 committed by Dirk Hohndel
parent 3912adfe5b
commit 7b46a8fddf
2 changed files with 6 additions and 0 deletions

View file

@ -1522,8 +1522,13 @@ void MainWindow::setApplicationState(const QByteArray& state) {
if (!applicationState.keys().contains(state))
return;
if (currentApplicationState == state)
return;
currentApplicationState = state;
QList<int> topSize = ui.topSplitter->sizes();
QList<int> bottomSize = ui.bottomSplitter->sizes();
// yes, index is zero both times. please don't change it.
if (ui.topSplitter->count() >= 2) {
ui.topSplitter->widget(0)->setParent(NULL);

View file

@ -219,6 +219,7 @@ private:
QWidget *bottomRight;
};
QHash<QByteArray, WidgetForBorder> applicationState;
QByteArray currentApplicationState;
};
#endif // MAINWINDOW_H