From 122ca8287f4c29e51f7d3883cff82c5318b8908a Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 13 Aug 2004 15:45:51 +0000 Subject: [PATCH] try to repaint window correctly when dispatching loooong commands git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8906 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 6 ++++++ src/frontends/qt2/QLPopupMenu.C | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index c3308011e0..8f373cedf1 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,9 @@ +2004-08-13 Jean-Marc Lasgouttes + + * 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 * QPrefs.C (setComboxFont): Use fromqstr() instead of latin1() for diff --git a/src/frontends/qt2/QLPopupMenu.C b/src/frontends/qt2/QLPopupMenu.C index 083f86846e..4612ff62b9 100644 --- a/src/frontends/qt2/QLPopupMenu.C +++ b/src/frontends/qt2/QLPopupMenu.C @@ -28,6 +28,8 @@ extern boost::scoped_ptr toplevel_keymap; #endif +#include + using std::distance; using std::make_pair; using std::string; @@ -62,7 +64,6 @@ pair 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]); }