]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: allow interactive and batch mode on Visu: different behavior for Mutex
authorprascle <prascle>
Mon, 2 Feb 2004 21:18:13 +0000 (21:18 +0000)
committerprascle <prascle>
Mon, 2 Feb 2004 21:18:13 +0000 (21:18 +0000)
src/SALOMEGUI/QAD_Desktop.cxx
src/SALOMEGUI/SALOMEGUI_VisuMutex.cxx
src/SALOMEGUI/SALOMEGUI_VisuMutex.hxx
src/Session/SALOME_Session_i.cxx

index 2c911191725392f94702531c3de640564910a1d3..d003e66ffecd74ca44e3bdf7f9c722a7ecb79c75 100644 (file)
@@ -71,6 +71,7 @@ using namespace std;
 
 #include "SALOMEGUI_CloseDlg.h"
 #include "SALOMEGUI_ActivateComponentDlg.h"
+#include "SALOMEGUI_VisuMutex.hxx"
 
 // QT Includes
 #include <qlabel.h>
@@ -1673,6 +1674,11 @@ bool QAD_Desktop::loadComponentData( const QString& compName )
   }
 
   Engines::Component_var comp ;
+  if ( compName.compare("VISU") == 0 )
+    {
+      VISU::Mutex::callFromGUI = 1;
+    }
+
   if ( compName.compare("SUPERV") == 0 ) {
     comp = getEngine( "SuperVisionContainer", compName) ;
   }
index 2ee92fcb822109ba1fda0319402c58556170cbae..3f90ff0875accce1e2e591a865cb2d5d25acac4b 100644 (file)
@@ -9,9 +9,12 @@ namespace VISU
 {
   static int mySCnt = 0;
   static int myQCnt = 0;
+
   //static QMutex localMutex;
   //static QMutex localSMutex;
 
+  int VISU::Mutex::callFromGUI;
+
   Mutex::Mutex(QMutex* theMutex, QApplication* theQApp, int theDelay) :
     myQApp(theQApp), myDelay(theDelay), myMutex(theMutex)
   {
index 425b81af0f07f60dcf84b22f6fd292f531b4f2f9..fd971064335bdc612fcf93160ee3b743127dcd5e 100644 (file)
@@ -7,13 +7,14 @@
 
 namespace VISU
 {
-  
+
   class Mutex
   {
     QMutex* myMutex;
     QApplication* myQApp;
     int isQAppLocked, isSessionLocked, myDelay;
   public:
+    static int callFromGUI;
     Mutex(QMutex* theMutex, QApplication* theQApp, int theDelay = 0);
     ~Mutex();
   };
index ba179e763be0af64f337802e9f844138a5e2ca98..e267e55d102daa068a997a534e3791e538e90a34 100644 (file)
@@ -33,6 +33,8 @@ using namespace std;
 #include "SALOME_NamingService.hxx"
 #include "SALOME_Session_QThread.hxx"
 
+#include "SALOMEGUI_VisuMutex.hxx"
+
 #include "QAD_Application.h"
 #include "QAD_Desktop.h"
 #include <qapplication.h>
@@ -57,6 +59,7 @@ SALOME_Session_i::SALOME_Session_i(int argc, char ** argv, CORBA::ORB_ptr orb, P
   _runningStudies= 0 ;
   _orb = CORBA::ORB::_duplicate(orb) ;
   _poa = PortableServer::POA::_duplicate(poa) ;
+  VISU::Mutex::callFromGUI = 0;
   MESSAGE("constructor end");
 }