From 820d6874daf78cc2d7f4c35750e9241f8f5d3b0e Mon Sep 17 00:00:00 2001 From: ana Date: Thu, 12 Nov 2015 14:51:56 +0300 Subject: [PATCH] Windows: destroy the active Trace before calling Py_Finalize() --- src/PVGUI/PVGUI_Module.cxx | 9 ++++++++- src/PVGUI/PVGUI_Module.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index c7e9c0af..31da0533 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -198,7 +198,6 @@ PVGUI_Module::PVGUI_Module() */ PVGUI_Module::~PVGUI_Module() { - vtkSMTrace::StopTrace(); if (myInitTimer) delete myInitTimer; } @@ -362,6 +361,7 @@ void PVGUI_Module::initialize( CAM_Application* app ) } } } + connect( application(), SIGNAL( appClosed() ), this, SLOT( onStopTrace() ) ); } /*! @@ -950,6 +950,13 @@ void PVGUI_Module::onRestartTrace() startTrace(); } +/*! + \brief. Close ParaView python trace. +*/ +void PVGUI_Module::onStopTrace() +{ + stopTrace(); +} /*! \brief Called when view manager is added */ diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index 3cac7f89..849a4338 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -187,6 +187,7 @@ private slots: void onEndProgress(); void onShowTrace(); void onRestartTrace(); + void onStopTrace(); public slots: virtual bool activateModule( SUIT_Study* ); -- 2.39.2