Create part, create Extrusion, result is an error message about not correct shape type(empty value).
if (aType == ModelAPI_AttributeSelectionList::typeId()) {
AttributeSelectionListPtr aSelectionListAttr = myFeature->data()->selectionList(attributeID());
// Restore shape type
- setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionListAttr->selectionType().c_str()));
+ std::string aSelectionType = aSelectionListAttr->selectionType().c_str();
+ if (!aSelectionType.empty())
+ setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionType.c_str()));
}
updateSelectionList();
return true;