From 53e2c9672f0b63b678726fbae915184093f145e1 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 30 Mar 2015 09:23:43 +0300 Subject: [PATCH] Fix of problem with colors of result on undo-redo of result creation and color assignment. --- src/Model/Model_AttributeIntArray.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- 2.39.2