Debugger: Fix perspective combobox activation

Fixes: QTCREATORBUG-21567
Change-Id: Ia309887fdc4752eb7ef82993608c83d0e2a757a8
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2018-11-27 14:24:14 +01:00
parent 5f79b5d2e5
commit b364282228

View File

@@ -384,7 +384,12 @@ void DebuggerMainWindowPrivate::selectPerspective(Perspective *perspective)
if (m_currentPerspective)
m_currentPerspective->d->restoreLayout();
const int index = indexInChooser(m_currentPerspective);
int index = indexInChooser(m_currentPerspective);
if (index == -1) {
if (Perspective *parent = Perspective::findPerspective(m_currentPerspective->d->m_parentPerspectiveId))
index = indexInChooser(parent);
}
if (index != -1) {
m_perspectiveChooser->setCurrentIndex(index);