]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0021883 [CEA 674] Deactivate pre-selection in OCC and VTK viewer
authorvsr <vsr@opencascade.com>
Fri, 9 Aug 2013 06:49:58 +0000 (06:49 +0000)
committervsr <vsr@opencascade.com>
Fri, 9 Aug 2013 06:49:58 +0000 (06:49 +0000)
0022174 [CEA 793] De-activate entirely selection in order to have a fast view usage

Addition fix of bad previous integration (wrong merge)

src/LightApp/LightApp_Application.cxx

index 4264a14ac664928d5775b6158d8cbc651a6824c6..7059f2474c34fcb6171e23a7231c411a6ff370d2 100644 (file)
@@ -1465,7 +1465,6 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType
                            resMgr->booleanValue( "3DViewer", "relative_size", vm->trihedronRelative() ));
     vm->setInteractionStyle( resMgr->integerValue( "3DViewer", "navigation_mode", vm->interactionStyle() ) );
     vm->setZoomingStyle( resMgr->integerValue( "3DViewer", "zooming_mode", vm->zoomingStyle() ) );
-
     vm->enablePreselection( resMgr->booleanValue( "OCCViewer", "enable_preselection", vm->isPreselectionEnabled() ) );
     vm->enableSelection(    resMgr->booleanValue( "OCCViewer", "enable_selection",    vm->isSelectionEnabled() ) );
 
@@ -2594,6 +2593,26 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
         continue;
 
       OCCViewer_Viewer* occVM = (OCCViewer_Viewer*)vm;
+      occVM->setInteractionStyle( mode );
+    }
+#endif
+#ifndef DISABLE_VTKVIEWER
+#ifndef DISABLE_SALOMEOBJECT
+    viewManagers( SVTK_Viewer::Type(), lst );
+    QListIterator<SUIT_ViewManager*> itVTK( lst );
+    while ( itVTK.hasNext() )
+    {
+      SUIT_ViewModel* vm = itVTK.next()->getViewModel();
+      if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
+        continue;
+
+      SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
+      if( vtkVM ) vtkVM->setInteractionStyle( mode );
+    }
+#endif
+#endif
+  }
+
 #ifndef DISABLE_OCCVIEWER
   if ( sec == QString( "OCCViewer" ) && param == QString( "enable_preselection" ) )
   {
@@ -2632,26 +2651,6 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
   }
 #endif
 
-      occVM->setInteractionStyle( mode );
-    }
-#endif
-#ifndef DISABLE_VTKVIEWER
-#ifndef DISABLE_SALOMEOBJECT
-    viewManagers( SVTK_Viewer::Type(), lst );
-    QListIterator<SUIT_ViewManager*> itVTK( lst );
-    while ( itVTK.hasNext() )
-    {
-      SUIT_ViewModel* vm = itVTK.next()->getViewModel();
-      if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
-        continue;
-
-      SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
-      if( vtkVM ) vtkVM->setInteractionStyle( mode );
-    }
-#endif
-#endif
-  }
-
   if ( sec == QString( "3DViewer" ) && param == QString( "zooming_mode" ) )
   {
     int mode = resMgr->integerValue( "3DViewer", "zooming_mode", 0 );