diff --git a/src/plugins/debugger/threadshandler.cpp b/src/plugins/debugger/threadshandler.cpp index 54b87599e3c..a37d6fbe1d9 100644 --- a/src/plugins/debugger/threadshandler.cpp +++ b/src/plugins/debugger/threadshandler.cpp @@ -408,6 +408,11 @@ void ThreadsHandler::setThreads(const GdbMi &data) if (!m_currentThread && threads.childCount() > 0) m_currentThread = rootItem()->childAt(0); + + if (!m_currentThread) { + const QModelIndex currentThreadIndex = m_currentThread->index(); + threadSwitcher()->setCurrentIndex(currentThreadIndex.row()); + } } QAbstractItemModel *ThreadsHandler::model()