{
LASSERT(d->views_[gv->id()] == gv, /**/);
d->views_.erase(gv->id());
- if (current_view_ == gv)
+ if (current_view_ == gv) {
current_view_ = 0;
+ theLyXFunc().setLyXView(0);
+ }
}
GuiView::~GuiView()
{
- if (guiApp->currentView() == this)
- guiApp->setCurrentView(0);
- theLyXFunc().setLyXView(0);
-
delete &d;
}
}
}
- // Make sure that no LFUN use this close to be closed View.
- theLyXFunc().setLyXView(0);
+ // Make sure that nothing will use this close to be closed View.
+ guiApp->unregisterView(this);
// Save toolbars configuration
if (isFullScreen()) {
it->second->saveSession();
}
- guiApp->unregisterView(this);
close_event->accept();
}