From: Richard Heck Date: Mon, 1 Nov 2010 19:37:59 +0000 (+0000) Subject: Fix bug #7002. I think this is correct, but Peter should check. X-Git-Tag: 2.0.0~2139 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9b105fc6bf79a023a2e28c0bc9d014be145aaee4;p=features.git 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 --- 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