{
// Qt bug? signal lastWindowClosed does not work
setAttribute(Qt::WA_QuitOnClose, false);
- // FIXME: the following statement avoids memory leaks but produces a
- // crash after a new window has been closed (click into the menu)
- //setAttribute(Qt::WA_DeleteOnClose, true);
+ setAttribute(Qt::WA_DeleteOnClose, true);
// hardcode here the platform specific icon size
d.smallIconSize = 14; // scaling problems
GuiView::~GuiView()
{
+ menubar_.reset();
delete &d;
}
if (name_.empty())
return;
+ // Here, We make sure that theLyXFunc points to the correct LyXView.
+ theLyXFunc().setLyXView(owner_->view());
+
Menu const & fromLyxMenu = owner_->backend().getMenu(name_);
owner_->backend().expand(fromLyxMenu, topLevelMenu_, owner_->view()->buffer());