]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp
Salome HOME
Task #3236: Generalization of extrusion
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_CompositeSketch.cpp
index 1a6767086da52f312287e1cf2fc74cab74fc31dc..b1f78b9fd5265a598cb7156b20350824dd9156a2 100644 (file)
@@ -50,6 +50,7 @@ void FeaturesPlugin_CompositeSketch::initCompositeSketchAttribtues(const int the
   // Initialize selection list.
   if(theInitFlags & InitBaseObjectsList) {
     data()->addAttribute(BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList::typeId());
+    myCurrentSelectionType = selectionList(BASE_OBJECTS_ID())->selectionType();
   }
 }
 
@@ -288,3 +289,15 @@ void storeSubShape(
     }
   }
 }
+
+//=================================================================================================
+void FeaturesPlugin_CompositeSketch::attributeChanged(const std::string& theID)
+{
+  if (theID == BASE_OBJECTS_ID()) {
+    AttributeSelectionListPtr anObjects = selectionList(BASE_OBJECTS_ID());
+    if (anObjects->size() == 0 || anObjects->selectionType() != myCurrentSelectionType) {
+      myCurrentSelectionType = anObjects->selectionType();
+      removeResults(0); // clear the results
+    }
+  }
+}