From 0422e870d55ae4ae62c9c863e8230429375ef6a8 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Fri, 7 Apr 2023 11:14:58 +0200 Subject: [PATCH] Avoid transfert of PV3DViewer to MultiTabWidget sub widget --- src/PVViewer/PVViewer_Core.cxx | 2 +- src/PVViewer/PVViewer_ViewWindow.cxx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVViewer/PVViewer_Core.cxx b/src/PVViewer/PVViewer_Core.cxx index 86eef145f..6ac97835e 100644 --- a/src/PVViewer/PVViewer_Core.cxx +++ b/src/PVViewer/PVViewer_Core.cxx @@ -131,7 +131,7 @@ bool PVViewer_Core::ParaviewInitApp() // Direct VTK log messages to our SALOME window - TODO: review this PVViewer_OutputWindow * w = PVViewer_OutputWindow::New(); vtkOutputWindow::SetInstance(w); - + pqActiveObjects::instance().setActiveView(nullptr); new pqTabbedMultiViewWidget(); // registers a "MULTIVIEW_WIDGET" on creation // Initialization of ParaView GUI widgets will be done when these widgets are // really needed. diff --git a/src/PVViewer/PVViewer_ViewWindow.cxx b/src/PVViewer/PVViewer_ViewWindow.cxx index 6e2516921..6309f86d3 100644 --- a/src/PVViewer/PVViewer_ViewWindow.cxx +++ b/src/PVViewer/PVViewer_ViewWindow.cxx @@ -32,6 +32,7 @@ #include #include +#include "pqActiveObjects.h" //--------------------------------------------------------- #define USE_DEBUG @@ -58,6 +59,7 @@ PVViewer_ViewWindow::PVViewer_ViewWindow( SUIT_Desktop* theDesktop, PVViewer_Vie myDesktop = theDesktop; myModel = theModel; setViewManager(myModel->getViewManager()); + pqActiveObjects::instance().setActiveView(nullptr); myPVMgr = qobject_cast(pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET")); if (myPVMgr) { SUIT_Application* app = SUIT_Session::session()->activeApplication(); -- 2.39.2