From e29f901221e0f39da359f7401c09f3d0afd58d2a Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 23 Jun 2016 19:55:08 +0300 Subject: [PATCH] IMP: an attempt to use result selection with other selection modes --- src/XGUI/XGUI_ContextMenuMgr.cpp | 3 ++- src/XGUI/XGUI_Workshop.cpp | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/XGUI/XGUI_ContextMenuMgr.cpp b/src/XGUI/XGUI_ContextMenuMgr.cpp index 76cc07738..178fc3f9d 100644 --- a/src/XGUI/XGUI_ContextMenuMgr.cpp +++ b/src/XGUI/XGUI_ContextMenuMgr.cpp @@ -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(); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index cffb0d4b0..ca80dce9f 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include #include @@ -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") { -- 2.39.2