// Initialize selection list.
if(theInitFlags & InitBaseObjectsList) {
data()->addAttribute(BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList::typeId());
+ myCurrentSelectionType = selectionList(BASE_OBJECTS_ID())->selectionType();
}
}
}
}
}
+
+//=================================================================================================
+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
+ }
+ }
+}