Commit 45cd2d1e authored by Ryan May's avatar Ryan May Committed by hjk
Browse files

Debugger: Set current tab in separate value display

As widgets are added and deleted from the tab widget, they can end
up in almost any order. As a result, when the window is raised, the
current tab does not necessarily reflect an item currently in the
watch view. Instead, make a tab the current one as it is added,
ensuring one of the currently relevant values is displayed by default.

Change-Id: Ia2d2eb60c844a008f8086820564dd20389ce519b
Reviewed-by: default avatarhjk <>
parent f5b0fcfb
......@@ -1638,12 +1638,13 @@ void WatchHandler::showSeparateWidget(QWidget *w)
m_separateWindow->setWindowFlags(m_separateWindow->windowFlags() | Qt::Window);
m_separateWindow->setWindowTitle(WatchHandler::tr("Debugger - Qt Creator"));
const int index = indexOf(m_separateWindow, w);
int index = indexOf(m_separateWindow, w);
if (index != -1) {
m_separateWindow->setTabText(index, w->windowTitle());
} else {
m_separateWindow->addTab(w, w->windowTitle());
index = m_separateWindow->addTab(w, w->windowTitle());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment