]> git.lyx.org Git - features.git/commitdiff
try to repaint window correctly when dispatching loooong commands
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 13 Aug 2004 15:45:51 +0000 (15:45 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 13 Aug 2004 15:45:51 +0000 (15:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8906 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QLPopupMenu.C

index c3308011e026b195731d9570f44bf205ae7d99d4..8f373cedf14417e812fac463db5a41f43496b44f 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-13  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * QLPopupMenu.C (fire): make Qt process events before we
+       dispatch our function (toolbars still do not get repainted
+       correctly, though)
+
 2004-08-12  Kornel Benko  <kornel.benko@berlin.de>
 
        * QPrefs.C (setComboxFont): Use fromqstr() instead of latin1() for
index 083f86846e7fa6b8696642c2b719519cc5645f3c..4612ff62b976fabfda5ea585003936e936a62058 100644 (file)
@@ -28,6 +28,8 @@
 extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
 #endif
 
+#include <qapplication.h>
+
 using std::distance;
 using std::make_pair;
 using std::string;
@@ -62,7 +64,6 @@ pair<int, QLPopupMenu *>
 createMenu(QMenuData * parent, MenuItem const * item, QLMenubar * owner,
           bool is_toplevel)
 {
-       // FIXME: leaks ??
        QLPopupMenu * pm = new QLPopupMenu(owner, item->submenuname(), is_toplevel);
        int const id = parent->insertItem(toqstr(getLabel(*item)), pm);
        return make_pair(id, pm);
@@ -82,6 +83,7 @@ QLPopupMenu::QLPopupMenu(QLMenubar * owner,
 
 void QLPopupMenu::fire(int index)
 {
+       qApp->processEvents();
        owner_->view()->activated(funcs_[index]);
 }