]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_WidgetShapeSelector.cpp
Salome HOME
Issue #2325 impossible to select center of cylinder in sketch
[modules/shaper.git] / src / PartSet / PartSet_WidgetShapeSelector.cpp
index ead2a719aab71e133fe8ea75ac919d9eeca000c6..056ca9dd6ea1d770a31e21b44961c7723b305cb4 100755 (executable)
@@ -19,6 +19,8 @@
 //
 
 #include "PartSet_WidgetShapeSelector.h"
+
+#include "PartSet_CenterPrs.h"
 #include "PartSet_Module.h"
 #include "PartSet_SketcherMgr.h"
 
@@ -74,7 +76,12 @@ bool PartSet_WidgetShapeSelector::activateSelectionAndFilters(bool toActivate)
 //********************************************************************
 bool PartSet_WidgetShapeSelector::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs)
 {
-  bool aValid = ModuleBase_WidgetShapeSelector::isValidSelectionCustom(thePrs);
+  bool aValid = false;
+  if (thePrs.get() && thePrs->interactive()->IsKind(STANDARD_TYPE(PartSet_CenterPrs)))
+    aValid = true; // we should not check acceptSubShape for such presentation
+  else
+    aValid = ModuleBase_WidgetShapeSelector::isValidSelectionCustom(thePrs);
+
   if (aValid) {
     ObjectPtr anObject = myWorkshop->selection()->getResult(thePrs);
     aValid = myExternalObjectMgr->isValidObject(anObject);