From: vsr Date: Tue, 19 Mar 2013 16:29:41 +0000 (+0000) Subject: Merge from V6_main 19/03/2013 X-Git-Tag: V7_1_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d64007f4f54b8a347acc7d0c8e4b5e7d34bd7ea;p=modules%2Fparavis.git Merge from V6_main 19/03/2013 --- diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index fa3cfb7e..df3f7b7d 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -103,6 +103,7 @@ #include #include #include +#include #include #include #include @@ -531,13 +532,21 @@ void PVGUI_Module::initialize( CAM_Application* app ) startTimer( 50 ); this->VTKConnect = vtkEventQtSlotConnect::New(); + vtkProcessModule* pm = vtkProcessModule::GetProcessModule(); - - this->VTKConnect->Connect(pm, vtkCommand::StartEvent, - this, SLOT(onStartProgress())); - this->VTKConnect->Connect(pm, vtkCommand::EndEvent, - this, SLOT(onEndProgress())); - + if(pm) { + vtkPVSession* pvs = dynamic_cast(pm->GetSession()); + if(pvs) { + vtkPVProgressHandler* ph = pvs->GetProgressHandler(); + if(ph) { + this->VTKConnect->Connect(ph, vtkCommand::StartEvent, + this, SLOT(onStartProgress())); + this->VTKConnect->Connect(ph, vtkCommand::EndEvent, + this, SLOT(onEndProgress())); + } + } + } + connect(&pqActiveObjects::instance(), SIGNAL(representationChanged(pqRepresentation*)), this, SLOT(onRepresentationChanged(pqRepresentation*)));