forked from qt-creator/qt-creator
Debugger: Fix thread switcher combobox to show current thread
When a breakpoint was hit, the combo box "popup" correctly showed which thread was interrupted (with the little left-arrow icon), but the actual combo box always showed the first thread. This change makes sure to update the combo box current index whenever a breakpoint is hit. Change-Id: I8339f4334df46830f5e8f82a2b4eafa9e6a388c4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -408,6 +408,11 @@ void ThreadsHandler::setThreads(const GdbMi &data)
|
|||||||
|
|
||||||
if (!m_currentThread && threads.childCount() > 0)
|
if (!m_currentThread && threads.childCount() > 0)
|
||||||
m_currentThread = rootItem()->childAt(0);
|
m_currentThread = rootItem()->childAt(0);
|
||||||
|
|
||||||
|
if (!m_currentThread) {
|
||||||
|
const QModelIndex currentThreadIndex = m_currentThread->index();
|
||||||
|
threadSwitcher()->setCurrentIndex(currentThreadIndex.row());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QAbstractItemModel *ThreadsHandler::model()
|
QAbstractItemModel *ThreadsHandler::model()
|
||||||
|
|||||||
Reference in New Issue
Block a user