X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeIntArray.cpp;h=b9cb85876640992a1a499fd2791519c6fd491087;hb=1c4fdb35d274c6205676a78e58edc196c28e7c4f;hp=2d061d411472c02ef5079f461d054c3e46f34a0a;hpb=a24b7e6f4d112d5e7889fd76f030298fc428cd01;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeIntArray.cpp b/src/Model/Model_AttributeIntArray.cpp index 2d061d411..b9cb85876 100644 --- a/src/Model/Model_AttributeIntArray.cpp +++ b/src/Model/Model_AttributeIntArray.cpp @@ -20,6 +20,11 @@ int Model_AttributeIntArray::size() { + if (myArray.IsNull() || !myArray->IsValid()) { + // this could be on undo and then redo creation of the attribute + // in result creation it may be uninitialized + myIsInitialized = myLab.FindAttribute(TDataStd_IntegerArray::GetID(), myArray) == Standard_True; + } // checking the validity because attribute (as a field) may be presented, // but without label: it is undoed return (myArray.IsNull() || !myArray->IsValid()) ? 0 : myArray->Length();