From: abn Date: Wed, 1 Oct 2014 15:34:27 +0000 (+0200) Subject: Fixing trace to ensure always a view window is up replaying the trace X-Git-Tag: V7_5_0b1~27^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=74ce60cd7b8fe157cf50c3f1418c867614958230;p=modules%2Fparavis.git Fixing trace to ensure always a view window is up replaying the trace --- diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index c7c8c7a7..2f055f11 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -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) {