From 2c577ad540df08f53756dc2ca713885625a71cce Mon Sep 17 00:00:00 2001 From: abn Date: Mon, 14 Nov 2016 16:40:25 +0100 Subject: [PATCH] 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 ...) --- src/PVViewer/PVViewer_GUIElements.cxx | 6 +++++- src/PVViewer/PVViewer_GUIElements.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) 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; -- 2.39.2