mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix for #9659 - Qt may send more then one close event to a window. Therefore multiple calls to unregisterView for a GuiView are possible. The first one removes the view from the list of known views, subsequent calls do nothing.
This commit is contained in:
parent
4b027dd4ea
commit
8a772549d7
@ -2735,10 +2735,11 @@ void GuiApplication::commitData(QSessionManager & sm)
|
|||||||
|
|
||||||
void GuiApplication::unregisterView(GuiView * gv)
|
void GuiApplication::unregisterView(GuiView * gv)
|
||||||
{
|
{
|
||||||
LAPPERR(d->views_[gv->id()] == gv);
|
if(d->views_.contains(gv->id()) && d->views_.value(gv->id()) == gv) {
|
||||||
d->views_.remove(gv->id());
|
d->views_.remove(gv->id());
|
||||||
if (current_view_ == gv)
|
if (current_view_ == gv)
|
||||||
current_view_ = 0;
|
current_view_ = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user