]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp
Salome HOME
Merge remote-tracking branch 'remotes/origin/EDF_2020_Lot2'
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_CompositeSketch.cpp
index 56f5861753a606f4fa7da04369ad4c0f5b452e0c..8ee137663d548bb7d3fe7ce080caa3e2abc63ac9 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();
   }
 }
 
@@ -308,3 +309,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
+    }
+  }
+}