Am Thu, 30 Jun 2022 16:42:02 +0200 schrieb Jean-Marc Lasgouttes <lasgouttes.lyx....@free.fr>:
> Le 30/06/2022 à 12:19, Kornel Benko a écrit : > >> I propose to apply my patch for now, since it makes sense in itself. But > >> I will investigate the rest. > > Here is the result of my investigation. First point, eventFilter is not > a bad design, I found out that this is the recommended way of > intercepting keypresses for a widget. > > Second, the reason for the recursion is that, in copy_params, old_buffer > is set only *after* having copied everything. Therefore, if some other > event occurs (like we had in message()), the method will try again to > update the document class, although it is already trying to do it. > Setting old_buffer as soon as possible fixes this. > > The the following patch does some refactoring to avoid checking document > classes all the time in eventFilter(). Can you test it? All I checked is > that enabling/disabling works well. > > JMarc It works, but still _many_ calls to FindAndReplaceWidget::eventFilter. (The simple start of findadv causes here 37 calls) Kornel
pgp1G1U3_6_QW.pgp
Description: Digitale Signatur von OpenPGP
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel