Salome HOME
WIP - This fixes the ParaVis compilation after deprecation of some ParaView API.
[modules/paravis.git] / src / PVGUI / PVGUI_Module.cxx
index 566f29b3e4a640d3c0a1ff8c7df4068ca6ca7b7e..6210acd08bab24929237d9c78e44fa152a5d3a56 100644 (file)
 #include <pqActiveObjects.h>
 #include <pqHelpReaction.h>
 #include <pqPluginManager.h>
-#include <pqPythonDialog.h>
+//#include <pqPythonDialog.h>
 #include <pqPythonManager.h>
 #include <pqLoadDataReaction.h>
 #include <pqPythonScriptEditor.h>
@@ -733,6 +733,19 @@ void PVGUI_Module::stopTrace()
 */
 void PVGUI_Module::executeScript( const char* script )
 {
+  // ???
+  // Not sure this is the right fix, but the PYTHON_MANAGER has a function named
+  // executeScript() which seems to do what the runScript on pyShellDialog() class
+  // was doing.
+#ifndef WNT
+  pqPythonManager* manager =
+    qobject_cast<pqPythonManager*>(pqApplicationCore::instance()->manager("PYTHON_MANAGER"));
+
+  if ( manager )  {
+    manager->executeScript(script);
+  }
+#endif
+  /*
 #ifndef WNT
   pqPythonManager* manager = qobject_cast<pqPythonManager*>(
                              pqApplicationCore::instance()->manager( "PYTHON_MANAGER" ) );
@@ -743,6 +756,7 @@ void PVGUI_Module::executeScript( const char* script )
     }
   }
 #endif
+  */
 }
 
 ///**