X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMGUI%2FGeometryGUI.cxx;h=f94d3902d8c10921d60dcc65205651e5bdcdd0f6;hb=2dbe613765884256942925d8a95293e3c473caec;hp=3a0d044aa8b4d795f1712fab202dfbafd6828846;hpb=31b7bc6fe3dfb003fd43d3f292b41ce4ae41a270;p=modules%2Fgeom.git diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 3a0d044aa..f94d3902d 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -47,10 +47,12 @@ #include #include #include +#include #include #include #include #include +#include // External includes #include @@ -466,7 +468,8 @@ void GeometryGUI::OnGUIEvent( int id ) id == 504 || // MENU OPERATION - ARCHIMEDE id == 505 || // MENU OPERATION - FILLET id == 506 || // MENU OPERATION - CHAMFER - id == 507 ) { // MENU OPERATION - CLIPPING RANGE + id == 507 || // MENU OPERATION - CLIPPING RANGE + id == 508 ) { // MENU OPERATION - GET SHAPES ON SHAPE #ifndef WNT library = getLibrary( "libOperationGUI.so" ); #else @@ -797,6 +800,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( 505, "FILLET" ); createGeomAction( 506, "CHAMFER" ); //createGeomAction( 507, "CLIPPING" ); + createGeomAction( 508, "GET_SHAPES_ON_SHAPES" ); createGeomAction( 9998, "MUL_TRANSFORM" ); createGeomAction( 9995, "EXPLODE_BLOCKS" ); @@ -946,6 +950,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createMenu( 503, operId, -1 ); createMenu( 504, operId, -1 ); + createMenu( 508, operId, -1 ); createMenu( separator(), operId, -1 ); createMenu( 505, transId, -1 ); createMenu( 506, transId, -1 ); @@ -1187,14 +1192,17 @@ bool GeometryGUI::activateModule( SUIT_Study* study ) // Reset actions accelerator keys //action(111)->setAccel(QKeySequence(CTRL + Key_I)); // Import //action(121)->setAccel(QKeySequence(CTRL + Key_E)); // Export - action(111)->setEnabled(true); // Import - action(121)->setEnabled(true); // Export + action(111)->setEnabled( true ); // Import: CTRL + Key_I + action(121)->setEnabled( true ); // Export: CTRL + Key_E + action( 33)->setEnabled( true ); // Delete: Key_Delete + action(901)->setEnabled( true ); // Rename: Key_F2 GUIMap::Iterator it; for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) it.value()->activate( application()->desktop() ); LightApp_SelectionMgr* sm = getApp()->selectionMgr(); + SUIT_ViewManager* vm; ViewManagerList OCCViewManagers, VTKViewManagers; @@ -1208,20 +1216,27 @@ bool GeometryGUI::activateModule( SUIT_Study* study ) while ( itVTK.hasNext() && (vm = itVTK.next()) ) myVTKSelectors.append( new LightApp_VTKSelector( dynamic_cast( vm->getViewModel() ), sm ) ); + //NPAL 19674 + SALOME_ListIO selected; + sm->selectedObjects( selected ); + sm->clearSelected(); + // disable OCC selectors - //getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() ); + getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() ); QListIterator itOCCSel( myOCCSelectors ); while ( itOCCSel.hasNext() ) if ( GEOMGUI_OCCSelector* sr = itOCCSel.next() ) sr->setEnabled(true); // disable VTK selectors - //getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() ); + getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() ); QListIterator itVTKSel( myVTKSelectors ); while ( itVTKSel.hasNext() ) if ( LightApp_VTKSelector* sr = itVTKSel.next() ) sr->setEnabled(true); + sm->setSelectedObjects( selected, true ); //NPAL 19674 + return true; } @@ -1247,12 +1262,16 @@ bool GeometryGUI::deactivateModule( SUIT_Study* study ) // Unset actions accelerator keys //action(111)->setAccel(QKeySequence()); // Import //action(121)->setAccel(QKeySequence()); // Export - action(111)->setEnabled(false); // Import - action(121)->setEnabled(false); // Export + action(111)->setEnabled( false ); // Import: CTRL + Key_I + action(121)->setEnabled( false ); // Export: CTRL + Key_E + action( 33)->setEnabled( false ); // Delete: Key_Delete + action(901)->setEnabled( false ); // Rename: Key_F2 + qDeleteAll(myOCCSelectors); myOCCSelectors.clear(); getApp()->selectionMgr()->setEnabled( true, OCCViewer_Viewer::Type() ); + qDeleteAll(myVTKSelectors); myVTKSelectors.clear(); getApp()->selectionMgr()->setEnabled( true, SVTK_Viewer::Type() ); @@ -1288,7 +1307,6 @@ void GeometryGUI::onWindowActivated( SUIT_ViewWindow* win ) action( 607 )->setEnabled( ViewOCC ); // RemoveInternalWires action( 608 )->setEnabled( ViewOCC ); // AddPointOnEdge // action( 609 )->setEnabled( ViewOCC ); // Free boundaries -// action( 413 )->setEnabled( ViewOCC || ViewVTK ); // Isos Settings action( 800 )->setEnabled( ViewOCC ); // Create Group action( 801 )->setEnabled( ViewOCC ); // Edit Group