Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare version 1.2.1: quick fix for iteration 2 release
[modules/shaper.git]
/
src
/
Model
/
Model_AttributeIntArray.cpp
diff --git
a/src/Model/Model_AttributeIntArray.cpp
b/src/Model/Model_AttributeIntArray.cpp
index 2d061d411472c02ef5079f461d054c3e46f34a0a..a61a9cc0e97c3d373bd9b2731f35c8dcc61e7d10 100644
(file)
--- a/
src/Model/Model_AttributeIntArray.cpp
+++ b/
src/Model/Model_AttributeIntArray.cpp
@@
-20,6
+20,11
@@
int Model_AttributeIntArray::size()
{
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);
+ }
// 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();
// 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();