From 89ff7a7b460c4d01b773037da2ece43389ace904 Mon Sep 17 00:00:00 2001 From: akl Date: Wed, 1 Apr 2015 11:31:43 +0400 Subject: [PATCH] 52640: Creation new PV Viewer breaks a previous PV viewer. --- src/LightApp/LightApp_Application.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index e86004081..b156836b3 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1464,7 +1464,12 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType #ifndef DISABLE_PVVIEWER if( vmType == PVViewer_Viewer::Type() ) { - viewMgr = new PVViewer_ViewManager( activeStudy(), desktop(), logWindow() ); + if ( viewMgr = dynamic_cast( getViewManager( vmType, false ) ) ) { + viewMgr->getActiveView()->setFocus(); + return 0; + } else { + viewMgr = new PVViewer_ViewManager( activeStudy(), desktop(), logWindow() ); + } } #endif #ifndef DISABLE_OCCVIEWER -- 2.39.2