forked from qt-creator/qt-creator
Projects: Fix misc settings widgets if vanished targets are shown
When vanished targets where shown in Projects, clicking on the project specific settings showed a blank page. There were hardcoded indices for the target and the misc settings. Get the right child for the index directly instead. Change-Id: I725d470ad04f8a227c91938efada76a757a7442c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -527,11 +527,11 @@ public:
|
||||
}
|
||||
|
||||
case PanelWidgetRole:
|
||||
case ActiveItemRole:
|
||||
if (m_currentChildIndex == 0)
|
||||
return m_targetsItem->data(column, role);
|
||||
if (m_currentChildIndex == 1)
|
||||
return m_miscItem->data(column, role);
|
||||
case ActiveItemRole: {
|
||||
TreeItem *child = childAt(m_currentChildIndex);
|
||||
if (child)
|
||||
return child->data(column, role);
|
||||
}
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user