]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Fixing trace to ensure always a view window is up replaying the trace
authorabn <adrien.bruneton@cea.fr>
Wed, 1 Oct 2014 15:34:27 +0000 (17:34 +0200)
committerabn <adrien.bruneton@cea.fr>
Wed, 1 Oct 2014 15:34:27 +0000 (17:34 +0200)
src/PVGUI/PVGUI_Module.cxx

index c7c8c7a76544a388cf9d982fc38bf03bb7d43f46..2f055f112ded2c637176552c970d7d387ece71c0 100644 (file)
@@ -893,7 +893,11 @@ QString PVGUI_Module::getTraceString()
 
   QString traceString(tracer->GetCurrentTrace());
   std::stringstream nl; nl << std::endl; // surely there is some Qt trick to do that in a portable way??
-  traceString = "import pvsimple" + QString(nl.str().c_str()) + traceString;
+  QString end_line(nl.str().c_str());
+  // 'import pvsimple' is necessary to fix the first call to DisableFirstRenderCamera in the paraview trace
+  // 'ShowParaviewView()' ensure there is an opened viewing window (otherwise SEGFAULT!)
+  traceString = "import pvsimple" + end_line +
+                "pvsimple.ShowParaviewView()" + end_line + traceString;
 
   // Replace import "paraview.simple" by "pvsimple"
   if ((!traceString.isNull()) && traceString.length() != 0) {