From 1513a4780af6a84a7a8f68a160882b99688502e0 Mon Sep 17 00:00:00 2001 From: asl Date: Tue, 1 Nov 2005 12:36:57 +0000 Subject: [PATCH] PAL10298 - Cut lines presentation is created not in active VTK view --- src/VISUGUI/VisuGUI_Tools.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index d18611d1..bbce9f1d 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -641,6 +641,23 @@ namespace VISU } SVTK_ViewWindow* + GetViewWindow( const SalomeApp_Module* theModule, const bool theCreate ) + { + if (SalomeApp_Application* anApp = theModule->getApp()) + { + SVTK_ViewWindow* wnd = dynamic_cast(anApp->desktop()->activeWindow()); + if( wnd ) + return wnd; + else + { + SUIT_ViewManager* aViewManager = anApp->getViewManager( SVTK_Viewer::Type(), theCreate ); + return dynamic_cast( aViewManager->getActiveView() ); + } + } + return NULL; + } + + /*SVTK_ViewWindow* GetViewWindow(const SalomeApp_Module* theModule, const bool theCreate ) { if(SalomeApp_Application* anApp = theModule->getApp()){ @@ -651,7 +668,7 @@ namespace VISU } } return NULL; - } + }*/ SVTK_ViewWindow* -- 2.39.2