]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
INT PAL 0052297: impossible to set point coordinates by click in OCC viewer
authormpa <mpa@opencascade.com>
Mon, 30 Jun 2014 07:55:42 +0000 (11:55 +0400)
committermpa <mpa@opencascade.com>
Mon, 30 Jun 2014 07:55:42 +0000 (11:55 +0400)
src/GEOMGUI/GeometryGUI.cxx

index f10e4a026d6dc8411dab6c51b46cf85d9a47f9e6..48f06c4adabdfc8a9906e033f67829196e4bd7ce 100644 (file)
@@ -1829,37 +1829,23 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
   getApp()->insertDockWindow( myCreationInfoWdg->getWinID(), myCreationInfoWdg );
   getApp()->placeDockWindow( myCreationInfoWdg->getWinID(), Qt::LeftDockWidgetArea );
 
+  //NPAL 19674
+  SALOME_ListIO selected;
+  sm->selectedObjects( selected );
+  sm->clearSelected();
+
   SUIT_ViewManager* vm;
   ViewManagerList OCCViewManagers, VTKViewManagers;
 
   application()->viewManagers( OCCViewer_Viewer::Type(), OCCViewManagers );
   QListIterator<SUIT_ViewManager*> itOCC( OCCViewManagers );
   while ( itOCC.hasNext() && (vm = itOCC.next()) )
-    myOCCSelectors.append( new GEOMGUI_OCCSelector( ((OCCViewer_ViewManager*)vm)->getOCCViewer(), sm ) );
+    onViewManagerAdded(vm);
 
   application()->viewManagers( SVTK_Viewer::Type(), VTKViewManagers );
   QListIterator<SUIT_ViewManager*> itVTK( VTKViewManagers );
   while ( itVTK.hasNext() && (vm = itVTK.next()) )
-    myVTKSelectors.append( new LightApp_VTKSelector( dynamic_cast<SVTK_Viewer*>( vm->getViewModel() ), sm ) );
-
-  //NPAL 19674
-  SALOME_ListIO selected;
-  sm->selectedObjects( selected );
-  sm->clearSelected();
-
-  // disable OCC selectors
-  getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() );
-  QListIterator<GEOMGUI_OCCSelector*> itOCCSel( myOCCSelectors );
-  while ( itOCCSel.hasNext() )
-    if ( GEOMGUI_OCCSelector* sr = itOCCSel.next() )
-      sr->setEnabled(true);
-
-  // disable VTK selectors
-  getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() );
-  QListIterator<LightApp_VTKSelector*> itVTKSel( myVTKSelectors );
-  while ( itVTKSel.hasNext() )
-    if ( LightApp_VTKSelector* sr = itVTKSel.next() )
-      sr->setEnabled(true);
+    onViewManagerAdded(vm);
 
   sm->setSelectedObjects( selected, true );   //NPAL 19674