mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 03:03:06 +00:00
processEvents tweaks
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9937 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e276c08990
commit
6fdbb6b8f0
@ -1,3 +1,10 @@
|
|||||||
|
2005-05-12 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
|
* QLPopupMenu.C (fire): use lyx_gui::sync_events.
|
||||||
|
|
||||||
|
* QMathDialog.C (resizeEvent): use lyx_gui::sync_events instead of
|
||||||
|
the event loop.
|
||||||
|
|
||||||
2005-05-11 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
2005-05-11 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
* lyx_gui.C (sync_events):
|
* lyx_gui.C (sync_events):
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include "MenuBackend.h"
|
#include "MenuBackend.h"
|
||||||
|
|
||||||
|
#include "frontends/lyx_gui.h"
|
||||||
|
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
|
|
||||||
#ifdef Q_WS_MACX
|
#ifdef Q_WS_MACX
|
||||||
@ -88,6 +90,9 @@ QLPopupMenu::QLPopupMenu(QLMenubar * owner,
|
|||||||
|
|
||||||
void QLPopupMenu::fire(int index)
|
void QLPopupMenu::fire(int index)
|
||||||
{
|
{
|
||||||
|
// make sure the interface is repainted correctly (in case the
|
||||||
|
// action needs a long time, like File>Open).
|
||||||
|
lyx_gui::sync_events();
|
||||||
#ifdef Q_WS_MACX
|
#ifdef Q_WS_MACX
|
||||||
if (index >= indexOffset) {
|
if (index >= indexOffset) {
|
||||||
MenuItem mi = owner_->backend().getMenu("LyX")[index - indexOffset];
|
MenuItem mi = owner_->backend().getMenu("LyX")[index - indexOffset];
|
||||||
|
@ -18,11 +18,10 @@
|
|||||||
|
|
||||||
#include "controllers/ControlMath.h"
|
#include "controllers/ControlMath.h"
|
||||||
|
|
||||||
|
#include "frontends/lyx_gui.h"
|
||||||
|
|
||||||
#include <qwidgetstack.h>
|
#include <qwidgetstack.h>
|
||||||
#include <qcombobox.h>
|
#include <qcombobox.h>
|
||||||
#if QT_VERSION >= 0x030100
|
|
||||||
#include <qeventloop.h>
|
|
||||||
#endif
|
|
||||||
#include <qpushbutton.h>
|
#include <qpushbutton.h>
|
||||||
#include <qlistbox.h>
|
#include <qlistbox.h>
|
||||||
#include <qpopupmenu.h>
|
#include <qpopupmenu.h>
|
||||||
@ -56,9 +55,7 @@ protected:
|
|||||||
|
|
||||||
w_->resize(viewport()->width(), w_->height());
|
w_->resize(viewport()->width(), w_->height());
|
||||||
// force the resize to get accurate scrollbar
|
// force the resize to get accurate scrollbar
|
||||||
#if QT_VERSION >= 0x030100
|
lyx_gui::sync_events();
|
||||||
qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
|
|
||||||
#endif
|
|
||||||
resizeContents(w_->width(), w_->height());
|
resizeContents(w_->width(), w_->height());
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user