]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1961: Accept result if selection mode is object
authorvsv <vitaly.smetannikov@opencascade.com>
Tue, 17 Jan 2017 13:04:11 +0000 (16:04 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Tue, 17 Jan 2017 13:04:11 +0000 (16:04 +0300)
src/CollectionPlugin/CollectionPlugin_WidgetField.cpp

index 7d091f00c31505f41d8a589473daeebcd7433ca1..59a2dc16b3d8419ae160ae99a68ebbb65aba4002 100644 (file)
@@ -826,8 +826,12 @@ bool CollectionPlugin_WidgetField::
   for (anIt = theValues.begin(); anIt != theValues.end(); anIt++) {
     ModuleBase_ViewerPrsPtr aValue = *anIt;
     ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aValue->object());
-    if (theToValidate && aRes.get() && acceptSubShape(aValue->shape(), aRes))
-      aSelected.append(aValue);
+    if (theToValidate && aRes.get()) {
+      if (myShapeTypeCombo->currentIndex() > 3)
+        aSelected.append(aValue);
+      else if (acceptSubShape(aValue->shape(), aRes))
+        aSelected.append(aValue);
+    }
   }
   AttributeSelectionListPtr aSelList =
     myFeature->data()->selectionList(CollectionPlugin_Field::SELECTED_ID());