From 7b46a8fddfce8d9c47c0220b426adcd7b8eecd84 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 10 Feb 2015 15:22:14 -0200 Subject: Don't set the state if it's the same Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index a8e2d206f..550fd386f 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1522,8 +1522,13 @@ void MainWindow::setApplicationState(const QByteArray& state) { if (!applicationState.keys().contains(state)) return; + if (currentApplicationState == state) + return; + + currentApplicationState = state; QList topSize = ui.topSplitter->sizes(); QList 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); -- cgit v1.2.3-70-g09d2