From 8fd7cbc69cc7243a094733ee69ef218b0b5b7d0f Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 9 Aug 2013 06:49:58 +0000 Subject: [PATCH] 0021883 [CEA 674] Deactivate pre-selection in OCC and VTK viewer 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 | 41 +++++++++++++-------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 4264a14ac..7059f2474 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -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 itVTK( lst ); + while ( itVTK.hasNext() ) + { + SUIT_ViewModel* vm = itVTK.next()->getViewModel(); + if ( !vm || !vm->inherits( "SVTK_Viewer" ) ) + continue; + + SVTK_Viewer* vtkVM = dynamic_cast( 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 itVTK( lst ); - while ( itVTK.hasNext() ) - { - SUIT_ViewModel* vm = itVTK.next()->getViewModel(); - if ( !vm || !vm->inherits( "SVTK_Viewer" ) ) - continue; - - SVTK_Viewer* vtkVM = dynamic_cast( vm ); - if( vtkVM ) vtkVM->setInteractionStyle( mode ); - } -#endif -#endif - } - if ( sec == QString( "3DViewer" ) && param == QString( "zooming_mode" ) ) { int mode = resMgr->integerValue( "3DViewer", "zooming_mode", 0 ); -- 2.39.2