From: mpv Date: Mon, 30 Mar 2015 06:23:43 +0000 (+0300) Subject: Fix of problem with colors of result on undo-redo of result creation and color assign... X-Git-Tag: V_1.1.0~74 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=53e2c9672f0b63b678726fbae915184093f145e1;p=modules%2Fshaper.git Fix of problem with colors of result on undo-redo of result creation and color assignment. --- diff --git a/src/Model/Model_AttributeIntArray.cpp b/src/Model/Model_AttributeIntArray.cpp index 2d061d411..a61a9cc0e 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); + } // 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();