forked from qt-creator/qt-creator
Debugger: Fix resizing of main perspective switcher combo
In case of debugger sub-perspectives this was effectively operating on the names of the subperspective, not the "Debugger" string. Change-Id: Ia5c3ea564b2b1a3ed3291d3cb6bae18e1fb5533f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -119,6 +119,7 @@ public:
|
||||
void resetCurrentPerspective();
|
||||
int indexInChooser(Perspective *perspective) const;
|
||||
void fixupLayoutIfNeeded();
|
||||
void updatePerspectiveChooserWidth();
|
||||
|
||||
DebuggerMainWindow *q = nullptr;
|
||||
Perspective *m_currentPerspective = nullptr;
|
||||
@@ -416,10 +417,17 @@ void DebuggerMainWindowPrivate::selectPerspective(Perspective *perspective)
|
||||
fixupLayoutIfNeeded();
|
||||
}
|
||||
|
||||
updatePerspectiveChooserWidth();
|
||||
}
|
||||
|
||||
void DebuggerMainWindowPrivate::updatePerspectiveChooserWidth()
|
||||
{
|
||||
Perspective *perspective = m_currentPerspective;
|
||||
int index = indexInChooser(m_currentPerspective);
|
||||
if (index == -1) {
|
||||
if (Perspective *parent = Perspective::findPerspective(m_currentPerspective->d->m_parentPerspectiveId))
|
||||
index = indexInChooser(parent);
|
||||
perspective = Perspective::findPerspective(m_currentPerspective->d->m_parentPerspectiveId);
|
||||
if (perspective)
|
||||
index = indexInChooser(perspective);
|
||||
}
|
||||
|
||||
if (index != -1) {
|
||||
|
||||
Reference in New Issue
Block a user