NPAL 19674 a new bug like NPAL18352

This commit is contained in:
dmv 2008-05-19 06:49:58 +00:00
parent d5f818a7ab
commit 61c3b696a2

View File

@ -50,6 +50,7 @@
#include <SalomeApp_Application.h> #include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h> #include <LightApp_SelectionMgr.h>
#include <LightApp_VTKSelector.h> #include <LightApp_VTKSelector.h>
#include <LightApp_DataObject.h>
#include <SalomeApp_Study.h> #include <SalomeApp_Study.h>
#include <LightApp_Preferences.h> #include <LightApp_Preferences.h>
#include <SALOME_LifeCycleCORBA.hxx> #include <SALOME_LifeCycleCORBA.hxx>
@ -1237,6 +1238,7 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
it.data()->activate( application()->desktop() ); it.data()->activate( application()->desktop() );
LightApp_SelectionMgr* sm = getApp()->selectionMgr(); LightApp_SelectionMgr* sm = getApp()->selectionMgr();
SUIT_ViewManager* vm; SUIT_ViewManager* vm;
ViewManagerList OCCViewManagers, VTKViewManagers; ViewManagerList OCCViewManagers, VTKViewManagers;
application()->viewManagers( OCCViewer_Viewer::Type(), OCCViewManagers ); application()->viewManagers( OCCViewer_Viewer::Type(), OCCViewManagers );
@ -1246,6 +1248,11 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
for ( vm = VTKViewManagers.first(); vm; vm = VTKViewManagers.next() ) for ( vm = VTKViewManagers.first(); vm; vm = VTKViewManagers.next() )
myVTKSelectors.append( new LightApp_VTKSelector( dynamic_cast<SVTK_Viewer*>( vm->getViewModel() ), sm ) ); 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 // disable OCC selectors
getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() ); getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() );
for ( GEOMGUI_OCCSelector* sr = myOCCSelectors.first(); sr; sr = myOCCSelectors.next() ) for ( GEOMGUI_OCCSelector* sr = myOCCSelectors.first(); sr; sr = myOCCSelectors.next() )
@ -1256,6 +1263,8 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
for ( LightApp_VTKSelector* sr = myVTKSelectors.first(); sr; sr = myVTKSelectors.next() ) for ( LightApp_VTKSelector* sr = myVTKSelectors.first(); sr; sr = myVTKSelectors.next() )
sr->setEnabled(true); sr->setEnabled(true);
sm->setSelectedObjects( selected, true ); //NPAL 19674
return true; return true;
} }