]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2632: Provide selection of features in multi-selector
authorvsv <vsv@opencascade.com>
Wed, 26 Sep 2018 08:35:01 +0000 (11:35 +0300)
committervsv <vsv@opencascade.com>
Wed, 26 Sep 2018 08:35:18 +0000 (11:35 +0300)
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp

index f5f69327487492ca54bf8f83885df36840df36de..9f3e7108745b0a4346d762d4e808449f988c384d 100755 (executable)
@@ -399,6 +399,11 @@ bool ModuleBase_WidgetMultiSelector::isValidSelectionCustom(const ModuleBase_Vie
   bool aValid = ModuleBase_WidgetSelector::isValidSelectionCustom(thePrs);
   if (aValid) {
     ResultPtr aResult = myWorkshop->selection()->getResult(thePrs);
+    if (!aResult.get()) { // In case if a feature was selected
+      FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(thePrs->object());
+      if (aFeature.get())
+        aResult = aFeature->firstResult();
+    }
     aValid = aResult.get() != NULL;
     if (aValid) {
       if (myFeature) {