mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
3912adfe5b
commit
7b46a8fddf
2 changed files with 6 additions and 0 deletions
|
@ -1522,8 +1522,13 @@ void MainWindow::setApplicationState(const QByteArray& state) {
|
||||||
if (!applicationState.keys().contains(state))
|
if (!applicationState.keys().contains(state))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (currentApplicationState == state)
|
||||||
|
return;
|
||||||
|
|
||||||
|
currentApplicationState = state;
|
||||||
QList<int> topSize = ui.topSplitter->sizes();
|
QList<int> topSize = ui.topSplitter->sizes();
|
||||||
QList<int> bottomSize = ui.bottomSplitter->sizes();
|
QList<int> bottomSize = ui.bottomSplitter->sizes();
|
||||||
|
|
||||||
// yes, index is zero both times. please don't change it.
|
// yes, index is zero both times. please don't change it.
|
||||||
if (ui.topSplitter->count() >= 2) {
|
if (ui.topSplitter->count() >= 2) {
|
||||||
ui.topSplitter->widget(0)->setParent(NULL);
|
ui.topSplitter->widget(0)->setParent(NULL);
|
||||||
|
|
|
@ -219,6 +219,7 @@ private:
|
||||||
QWidget *bottomRight;
|
QWidget *bottomRight;
|
||||||
};
|
};
|
||||||
QHash<QByteArray, WidgetForBorder> applicationState;
|
QHash<QByteArray, WidgetForBorder> applicationState;
|
||||||
|
QByteArray currentApplicationState;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|
Loading…
Add table
Reference in a new issue