X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeSelectionList.cpp;h=3b67df9eb0a9063e23a7874fde696432fdaa9857;hb=2e39226506e4b82f6ae5dcc26e776571801b1555;hp=79eb5c714e12ee2e5565c209dfb271f3d793b389;hpb=c3181094455d7e8f52d887b54dbfb798d4c4d210;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index 79eb5c714..3b67df9eb 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -102,6 +102,14 @@ void Model_AttributeSelectionList::clear() } } +bool Model_AttributeSelectionList::isInitialized() +{ + if (size() == 0) { // empty list is not initialized list: sketch will be not valid after add/undo + return false; + } + return ModelAPI_AttributeSelectionList::isInitialized(); +} + Model_AttributeSelectionList::Model_AttributeSelectionList(TDF_Label& theLabel) { myIsInitialized = theLabel.FindAttribute(TDataStd_Integer::GetID(), mySize) == Standard_True;