]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
IMP: an attempt to use result selection with other selection modes
authornds <nds@opencascade.com>
Thu, 23 Jun 2016 16:55:08 +0000 (19:55 +0300)
committernds <nds@opencascade.com>
Thu, 23 Jun 2016 16:55:33 +0000 (19:55 +0300)
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_Workshop.cpp

index 76cc0773864bd8ca1811af573a170caa97b6878a..178fc3f9daa7439bafe21732c0ac2305aba676ac 100644 (file)
@@ -562,7 +562,8 @@ void XGUI_ContextMenuMgr::addViewerMenu(QMenu* theMenu) const
     aSelMenu->addAction(action("SELECT_VERTEX_CMD"));
     aSelMenu->addAction(action("SELECT_EDGE_CMD"));
     aSelMenu->addAction(action("SELECT_FACE_CMD"));
-    aSelMenu->addSeparator();
+    //IMP: an attempt to use result selection with other selection modes
+    //aSelMenu->addSeparator();
     aSelMenu->addAction(action("SELECT_RESULT_CMD"));
     theMenu->addMenu(aSelMenu);
     theMenu->addSeparator();
index cffb0d4b088296aba150e06c0c990a2c4b02f5cc..ca80dce9fd40037de9672b78acb23d1dd41bd911 100755 (executable)
@@ -70,6 +70,7 @@
 #include <ModuleBase_PagedContainer.h>
 #include <ModuleBase_WidgetValidated.h>
 #include <ModuleBase_ModelWidget.h>
+#include <ModuleBase_ResultPrs.h>
 
 #include <Config_Common.h>
 #include <Config_FeatureMessage.h>
@@ -213,6 +214,9 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
     myViewerSelMode.append(TopAbs_EDGE);
   if (ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "vertex-selection", true))
     myViewerSelMode.append(TopAbs_VERTEX);
+  //IMP: an attempt to use result selection with other selection modes
+  myViewerSelMode.append(ModuleBase_ResultPrs::Sel_Result);//TopAbs_VERTEX);
+  myViewerSelMode.append(TopAbs_COMPSOLID);
 }
 
 //******************************************************
@@ -1254,7 +1258,10 @@ void XGUI_Workshop::onContextMenuCommand(const QString& theId, bool isChecked)
   } else if (theId == "SELECT_FACE_CMD") {
     setViewerSelectionMode(TopAbs_FACE);
   } else if (theId == "SELECT_RESULT_CMD") {
-    setViewerSelectionMode(-1);
+    //setViewerSelectionMode(-1);
+    //IMP: an attempt to use result selection with other selection modes
+    setViewerSelectionMode(ModuleBase_ResultPrs::Sel_Result);
+    setViewerSelectionMode(TopAbs_COMPSOLID);
   } else if (theId == "SHOW_RESULTS_CMD") {
     highlightResults(aObjects);
   } else if (theId == "SHOW_FEATURE_CMD") {