From 74ce60cd7b8fe157cf50c3f1418c867614958230 Mon Sep 17 00:00:00 2001 From: abn Date: Wed, 1 Oct 2014 17:34:27 +0200 Subject: [PATCH] Fixing trace to ensure always a view window is up replaying the trace --- src/PVGUI/PVGUI_Module.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) { -- 2.39.2