Jean-Marc Lasgouttes wrote: > Here is a tentative patch for > http://bugzilla.lyx.org/show_bug.cgi?id=1941 > > I am not sure it is the exact right thing to do, so I'd appreciate > some testing. Bennett, in particular, could you try it out on OS X? > > The problem was that Dialog::apply() dispatches LFUN_INSET_APPLY, and > the icons are disabled because the main window does not have the focus > (this is the special code I added for LyX/Mac).
I tried to understand where in the code that happens, but failed. Could you please tell me the place where the main window without focus prevents the icons from being enabled? > My fix is to avoid > updating toolbar/menubar for INTERNAL dispatches. I don't think that this is the right fix. The problem is qt-only, so it should be fixed in the qt frontend. I don't know if that currently happens, but I could imagine the case where applying a dialog makes an lfun invalid. In this case we certainly want that icon to be disabled, but that does not work anymore with your fix. The right fix is IMHO to fix the focus problem. Why is it not possible to give the focus to the main window after a dialog is closed? Georg