From f847fb64f87830d0ab503eaba62d2814b773f10a Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Mon, 3 Mar 2008 15:44:08 +0000 Subject: [PATCH] * Hide popup asynchronously because we might be here inside of LFUN dispatchers. Hiding a popup can trigger a focus event on the workarea which then redisplays the cursor. But the metrics are not yet up to date such that the coord cache has not all insets yet. The cursorPos methods would triggers asserts in the coord cache then. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23416 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiCompleter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiCompleter.cpp b/src/frontends/qt4/GuiCompleter.cpp index a56df94e46..b40380340f 100644 --- a/src/frontends/qt4/GuiCompleter.cpp +++ b/src/frontends/qt4/GuiCompleter.cpp @@ -498,7 +498,13 @@ void GuiCompleter::showPopup(Cursor & cur) void GuiCompleter::hidePopup(Cursor & cur) { - popup()->hide(); + // hide popup asynchronously because we might be here inside of + // LFUN dispatchers. Hiding a popup can trigger a focus event on the + // workarea which then redisplays the cursor. But the metrics are not + // yet up to date such that the coord cache has not all insets yet. The + // cursorPos methods would triggers asserts in the coord cache then. + QTimer::singleShot(0, popup(), SLOT(hide())); + if (popup_timer_.isActive()) popup_timer_.stop(); -- 2.39.5