From: asl Date: Tue, 1 Nov 2005 12:36:57 +0000 (+0000) Subject: PAL10298 - Cut lines presentation is created not in active VTK view X-Git-Tag: V3_1_0a3~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1513a4780af6a84a7a8f68a160882b99688502e0;p=modules%2Fvisu.git PAL10298 - Cut lines presentation is created not in active VTK view --- 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*