From 9b105fc6bf79a023a2e28c0bc9d014be145aaee4 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 1 Nov 2010 19:37:59 +0000 Subject: [PATCH] Fix bug #7002. I think this is correct, but Peter should check. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35970 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/InGuiThread.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/InGuiThread.h b/src/frontends/qt4/InGuiThread.h index 4939c64726..f27317f4c8 100644 --- a/src/frontends/qt4/InGuiThread.h +++ b/src/frontends/qt4/InGuiThread.h @@ -16,6 +16,7 @@ #include #include +#include "frontends/Application.h" #include "support/bind.h" #include "support/functional.h" @@ -58,7 +59,10 @@ public: R call(F f) { func_ = f; - callInGuiThread(); + if (theApp() == 0) + synchronousFunctionCall(); + else + callInGuiThread(); return return_value_; } @@ -121,7 +125,10 @@ public: void call(F f) { func_ = f; - callInGuiThread(); + if (theApp() == 0) + synchronousFunctionCall(); + else + callInGuiThread(); } template -- 2.39.5