+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
extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
#endif
+#include <qapplication.h>
+
using std::distance;
using std::make_pair;
using std::string;
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);
void QLPopupMenu::fire(int index)
{
+ qApp->processEvents();
owner_->view()->activated(funcs_[index]);
}