INT PAL 0052297: impossible to set point coordinates by click in OCC viewer

This commit is contained in:
mpa 2014-06-30 11:55:42 +04:00
parent f84f401861
commit 5b374060cb

View File

@ -1829,37 +1829,23 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
getApp()->insertDockWindow( myCreationInfoWdg->getWinID(), myCreationInfoWdg ); getApp()->insertDockWindow( myCreationInfoWdg->getWinID(), myCreationInfoWdg );
getApp()->placeDockWindow( myCreationInfoWdg->getWinID(), Qt::LeftDockWidgetArea ); getApp()->placeDockWindow( myCreationInfoWdg->getWinID(), Qt::LeftDockWidgetArea );
//NPAL 19674
SALOME_ListIO selected;
sm->selectedObjects( selected );
sm->clearSelected();
SUIT_ViewManager* vm; SUIT_ViewManager* vm;
ViewManagerList OCCViewManagers, VTKViewManagers; ViewManagerList OCCViewManagers, VTKViewManagers;
application()->viewManagers( OCCViewer_Viewer::Type(), OCCViewManagers ); application()->viewManagers( OCCViewer_Viewer::Type(), OCCViewManagers );
QListIterator<SUIT_ViewManager*> itOCC( OCCViewManagers ); QListIterator<SUIT_ViewManager*> itOCC( OCCViewManagers );
while ( itOCC.hasNext() && (vm = itOCC.next()) ) while ( itOCC.hasNext() && (vm = itOCC.next()) )
myOCCSelectors.append( new GEOMGUI_OCCSelector( ((OCCViewer_ViewManager*)vm)->getOCCViewer(), sm ) ); onViewManagerAdded(vm);
application()->viewManagers( SVTK_Viewer::Type(), VTKViewManagers ); application()->viewManagers( SVTK_Viewer::Type(), VTKViewManagers );
QListIterator<SUIT_ViewManager*> itVTK( VTKViewManagers ); QListIterator<SUIT_ViewManager*> itVTK( VTKViewManagers );
while ( itVTK.hasNext() && (vm = itVTK.next()) ) while ( itVTK.hasNext() && (vm = itVTK.next()) )
myVTKSelectors.append( new LightApp_VTKSelector( dynamic_cast<SVTK_Viewer*>( vm->getViewModel() ), sm ) ); onViewManagerAdded(vm);
//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);
sm->setSelectedObjects( selected, true ); //NPAL 19674 sm->setSelectedObjects( selected, true ); //NPAL 19674