forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.10' into 4.11
Change-Id: Iad66b08f8d6d7f14319674ae6bb26cdba43b3bfa
This commit is contained in:
@@ -553,6 +553,7 @@ void PerspectivePrivate::resetPerspective()
|
||||
} else {
|
||||
op.setupLayout();
|
||||
op.dock->setVisible(op.visibleByDefault);
|
||||
theMainWindow->d->m_persistentChangedDocks.remove(op.name());
|
||||
qCDebug(perspectivesLog) << "SETTING " << op.name()
|
||||
<< " TO ACTIVE: " << op.visibleByDefault;
|
||||
}
|
||||
@@ -937,12 +938,10 @@ void PerspectivePrivate::restoreLayout()
|
||||
qCDebug(perspectivesLog) << "PERSPECTIVE STATE AVAILABLE BY FULL ID.";
|
||||
}
|
||||
|
||||
if (state.isEmpty()) {
|
||||
qCDebug(perspectivesLog) << "PERSPECTIVE " << m_id << "RESTORE NOT POSSIBLE, NO STORED STATE";
|
||||
} else {
|
||||
bool result = theMainWindow->restoreState(state);
|
||||
qCDebug(perspectivesLog) << "PERSPECTIVE " << m_id << "RESTORED. SUCCESS: " << result;
|
||||
}
|
||||
// The order is important here: While QMainWindow can restore layouts with
|
||||
// not-existing docks (some placeholders are used internally), later
|
||||
// replacements with restoreDockWidget(dock) trigger a re-layout, resulting
|
||||
// in different sizes. So make sure all docks exist first before restoring state.
|
||||
|
||||
qCDebug(perspectivesLog) << "PERSPECTIVE" << m_id << "RESTORING LAYOUT FROM " << settingsId();
|
||||
for (DockOperation &op : m_dockOperations) {
|
||||
@@ -955,6 +954,13 @@ void PerspectivePrivate::restoreLayout()
|
||||
<< (active == op.visibleByDefault ? "DEFAULT USER" : "*** NON-DEFAULT USER");
|
||||
}
|
||||
}
|
||||
|
||||
if (state.isEmpty()) {
|
||||
qCDebug(perspectivesLog) << "PERSPECTIVE " << m_id << "RESTORE NOT POSSIBLE, NO STORED STATE";
|
||||
} else {
|
||||
bool result = theMainWindow->restoreState(state);
|
||||
qCDebug(perspectivesLog) << "PERSPECTIVE " << m_id << "RESTORED, SUCCESS: " << result;
|
||||
}
|
||||
}
|
||||
|
||||
void PerspectivePrivate::saveLayout()
|
||||
|
||||
Reference in New Issue
Block a user