]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PAL10298 - Cut lines presentation is created not in active VTK view
authorasl <asl@opencascade.com>
Tue, 1 Nov 2005 12:36:57 +0000 (12:36 +0000)
committerasl <asl@opencascade.com>
Tue, 1 Nov 2005 12:36:57 +0000 (12:36 +0000)
src/VISUGUI/VisuGUI_Tools.cxx

index d18611d1b45e74a678cc538770fb4a76f94c4f61..bbce9f1d086f4e439fa907b2f371cdc51b2d14d2 100644 (file)
@@ -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<SVTK_ViewWindow*>(anApp->desktop()->activeWindow());
+      if( wnd )
+       return wnd;
+      else
+      {
+       SUIT_ViewManager* aViewManager = anApp->getViewManager( SVTK_Viewer::Type(), theCreate );
+       return dynamic_cast<SVTK_ViewWindow*>( 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*