From: abn Date: Mon, 14 Nov 2016 15:40:25 +0000 (+0100) Subject: Bug fix: pipeline was disconnected when executing Python script. X-Git-Tag: V8_2_0b1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4460d6b42dd915b478ae0147610b74738f7be2d5;p=modules%2Fgui.git Bug fix: pipeline was disconnected when executing Python script. This comes from the new way widgets instanciation is handled. See KitWare issue #10871: https://www.kitware.com/Bug/view.php?id=10871 More to come to align the rest (i.e. Prop panels, etc ...) --- diff --git a/src/PVViewer/PVViewer_GUIElements.cxx b/src/PVViewer/PVViewer_GUIElements.cxx index 70e360716..4421a22e8 100644 --- a/src/PVViewer/PVViewer_GUIElements.cxx +++ b/src/PVViewer/PVViewer_GUIElements.cxx @@ -64,6 +64,7 @@ PVViewer_GUIElements::PVViewer_GUIElements(QMainWindow* desk) : myDesktop(desk), propertiesPanel(0), pipelineBrowserWidget(0), + pipelineModel(0), sourcesMenu(0), filtersMenu(0), macrosMenu(0), @@ -88,7 +89,10 @@ void PVViewer_GUIElements::buildPVWidgets() //Pipeline Browser if ( !pipelineBrowserWidget ) { - pipelineBrowserWidget = new pqPipelineBrowserWidget(myDesktop); + pqPipelineModel* pipelineModel = new pqPipelineModel(*pqApplicationCore::instance()->getServerManagerModel(), this); + pipelineModel->setView(pqActiveObjects::instance().activeView()); + pipelineBrowserWidget = new pqPipelineBrowserWidget(myDesktop); + pipelineBrowserWidget->setModel(pipelineModel); } // Properties panel diff --git a/src/PVViewer/PVViewer_GUIElements.h b/src/PVViewer/PVViewer_GUIElements.h index eead0ef14..1d36c612c 100644 --- a/src/PVViewer/PVViewer_GUIElements.h +++ b/src/PVViewer/PVViewer_GUIElements.h @@ -28,6 +28,7 @@ class pqPropertiesPanel; class pqPipelineBrowserWidget; +class pqPipelineModel; class QMainWindow; class QMenu; class QToolBar; @@ -75,6 +76,7 @@ private: // Widgets pqPropertiesPanel* propertiesPanel; pqPipelineBrowserWidget* pipelineBrowserWidget; + pqPipelineModel* pipelineModel; // Dummy QMenus receiving ParaView's reaction for automatic add when new sources are added QMenu* sourcesMenu;