From 00d9996a9bd0483a5b7f4b7b615b8a949684a4cd Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 27 Nov 2009 09:21:47 +0000 Subject: [PATCH] clearKnownViewManagers added --- src/LightApp/LightApp_Application.cxx | 31 +++++++++++++++++++++++++++ src/LightApp/LightApp_Application.h | 3 +++ 2 files changed, 34 insertions(+) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 9af3c4b08..c0c990868 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -3091,3 +3091,34 @@ bool LightApp_Application::openAction( const int choice, const QString& aName ) return res; } + +void LightApp_Application::clearKnownViewManagers() +{ + QStringList aTypesList; +#ifndef DISABLE_GLVIEWER + aTypesList< aMgrList; + viewManagers( aMgrList ); + foreach (SUIT_ViewManager* aMgr, aMgrList) { + if (aTypesList.contains(aMgr->getType())) + removeViewManager(aMgr); + } +} diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 953947f13..2095dd097 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -147,6 +147,9 @@ public: virtual void updateDesktopTitle(); + // Removes ViewManagers only of known type + virtual void clearKnownViewManagers(); + signals: void studyOpened(); void studySaved(); -- 2.39.2