mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Fix a crash when applying the preferences.
The problem is that all toolbars are deleted and thus also the LayoutBox, which I made a member of GuiView. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31051 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3c91fecb61
commit
ffea0ce1e9
@ -296,8 +296,6 @@ GuiView::GuiView(int id)
|
||||
// GuiToolbars *must* be initialised before the menu bar.
|
||||
normalSizedIcons(); // at least on Mac the default is 32 otherwise, which is huge
|
||||
constructToolbars();
|
||||
d.layout_ = new LayoutBox(*this);
|
||||
d.stack_widget_->addWidget(d.layout_);
|
||||
|
||||
// set ourself as the current view. This is needed for the menu bar
|
||||
// filling, at least for the static special menu item on Mac. Otherwise
|
||||
@ -436,6 +434,12 @@ void GuiView::constructToolbars()
|
||||
delete it->second;
|
||||
d.toolbars_.clear();
|
||||
|
||||
// I don't like doing this here, but the standard toolbar
|
||||
// destroys this object when it's destroyed itself (vfr)
|
||||
d.layout_ = new LayoutBox(*this);
|
||||
d.stack_widget_->addWidget(d.layout_);
|
||||
d.layout_->move(0,0);
|
||||
|
||||
// extracts the toolbars from the backend
|
||||
Toolbars::Infos::iterator cit = guiApp->toolbars().begin();
|
||||
Toolbars::Infos::iterator end = guiApp->toolbars().end();
|
||||
|
Loading…
Reference in New Issue
Block a user