forked from qt-creator/qt-creator
Don't change context if focus widget parent hierarchy doesn't define one
We now keep the current context if the focus is set on a widget with a
parent hierarchy that doesn't define one. This way, toplevels without a
context, like popup windows without parent, will keep the behavior from
before other toplevels could define contexts at all
(2118d542e6)
Task-number: QTCREATORBUG-8667
Change-Id: I8dd04d1f97f6ced10f8fa4269bc91457211396ca
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
@@ -1128,6 +1128,9 @@ void MainWindow::updateFocusWidget(QWidget *old, QWidget *now)
|
||||
p = p->parentWidget();
|
||||
}
|
||||
}
|
||||
|
||||
// ignore toplevels that define no context, like popups without parent
|
||||
if (newContext || qApp->focusWidget() == focusWidget())
|
||||
updateContextObject(newContext);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user