Am 05.01.2014 um 20:36 schrieb Jean-Marc Lasgouttes <lasgout...@lyx.org>:

> Le 04/01/2014 22:32, Stephan Witt a écrit :
>> But sorry, now I have another unrelated problem, unfortunately.
>> It's a really old one: when repeatedly open and close the main window
>> LyX crashes in Qt-menu-code. There are references to this problem here:
>> 
>> * http://www.lyx.org/trac/ticket/7959
>> * https://bugreports.qt-project.org/browse/QTBUG-25399
>> 
>> The attached patch addresses this issue. The culprit seems to be
>> the movement of the Reconfigure menu item to the Application menu.
>> 
>> Without it I cannot reproduce the bug anymore. But the Reconfigure
>> menu item is left at Tools now. This may confuse experienced LyX
>> on Mac users.
> 
> Would it be possible to have a static bool variable indicating whether 
> Reconfigure has already been inserted ? In this case one would just skip it.

This looks interesting - from the Qt docs:

"If you want all windows in a Mac application to share one menu bar, you must 
create a menu bar that does not have a parent.
Create a parent-less menu bar this way:
 QMenuBar *menuBar = new QMenuBar(0);
Note: Do not call QMainWindow::menuBar() to create the shared menu bar, because 
that menu bar will have theQMainWindow as its parent. That menu bar would only 
be displayed for the parent QMainWindow."

This is the relevant code from LyX:

GuiView.cpp, lines 434 and 435:

        // Fill up the menu bar.
        guiApp->menus().fillMenuBar(menuBar(), this, true);

So, it's done exactly the wrong way.

Stephan

Reply via email to