Clear focus if the widget being deleted is the parent's focus child.
If a widget is deleted as a result of a window activation changed then it is possible that the parent does not clear the focus because of the activation change. If the focus child is actually part of an embedded widget in the graphicsview then it needs to be handled explicitly in this case too. Change-Id: I3e7a2b963f175828de4c19283178560abca91235 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
This commit is contained in:
parent
d9ea4bb144
commit
22fbb5be6e
@ -1401,7 +1401,7 @@ QWidget::~QWidget()
|
||||
w = w->d_func()->extra->focus_proxy;
|
||||
QWidget *window = w->window();
|
||||
QWExtra *e = window ? window->d_func()->extra : 0;
|
||||
if (!e || !e->proxyWidget)
|
||||
if (!e || !e->proxyWidget || (w->parentWidget() && w->parentWidget()->d_func()->focus_child == this))
|
||||
#endif
|
||||
clearFocus();
|
||||
} QT_CATCH(...) {
|
||||
|
Loading…
Reference in New Issue
Block a user