]> git.lyx.org Git - features.git/commitdiff
Fix bug #7002. I think this is correct, but Peter should check.
authorRichard Heck <rgheck@comcast.net>
Mon, 1 Nov 2010 19:37:59 +0000 (19:37 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 1 Nov 2010 19:37:59 +0000 (19:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35970 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/InGuiThread.h

index 4939c6472605381e5968166287b63f1ef904b5d3..f27317f4c891b30541283a153e713d1671fea771 100644 (file)
@@ -16,6 +16,7 @@
 #include <QObject>
 #include <QWaitCondition>
 
+#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<class F, class P1>