mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
Potential bug fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24907 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
85d944702f
commit
5d32aace21
@ -980,8 +980,10 @@ void GuiApplication::unregisterView(GuiView * gv)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -342,10 +342,6 @@ GuiView::GuiView(int id)
|
||||
|
||||
GuiView::~GuiView()
|
||||
{
|
||||
if (guiApp->currentView() == this)
|
||||
guiApp->setCurrentView(0);
|
||||
theLyXFunc().setLyXView(0);
|
||||
|
||||
delete &d;
|
||||
}
|
||||
|
||||
@ -427,8 +423,8 @@ void GuiView::closeEvent(QCloseEvent * close_event)
|
||||
}
|
||||
}
|
||||
|
||||
// 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()) {
|
||||
@ -458,7 +454,6 @@ void GuiView::closeEvent(QCloseEvent * close_event)
|
||||
it->second->saveSession();
|
||||
}
|
||||
|
||||
guiApp->unregisterView(this);
|
||||
close_event->accept();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user