From: mpv Date: Tue, 8 Sep 2015 07:23:52 +0000 (+0300) Subject: Make information about displayed objects loaded also from the old files. X-Git-Tag: V_1.4.0_beta4~81^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b4e9b4ac13c6e191d38e63d0a829dc91a5a89c2a;p=modules%2Fshaper.git Make information about displayed objects loaded also from the old files. --- diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index b98dbf49c..79a405366 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -75,11 +75,14 @@ void Model_Data::setLabel(TDF_Label theLab) myFlags->SetValue(kFlagDisplayed, Standard_True); // is displayed by default is true myFlags->SetValue(kFlagDeleted, Standard_False); // is deleted by default is false } else if (myFlags->Length() != 3) { // for old formats support + Standard_Boolean aFlag0 = myFlags->Upper() >= 0 ? myFlags->Value(0) : Standard_True; + Standard_Boolean aFlag1 = myFlags->Upper() >= 1 ? myFlags->Value(1) : Standard_True; + Standard_Boolean aFlag2 = myFlags->Upper() >= 2 ? myFlags->Value(2) : Standard_True; Handle(TColStd_HArray1OfByte) aNewArray = new TColStd_HArray1OfByte(0, 2); - aNewArray->SetValue(0, myFlags->Upper() > 0 ? myFlags->Value(0) : Standard_True); - aNewArray->SetValue(1, myFlags->Upper() > 1 ? myFlags->Value(1) : Standard_True); - aNewArray->SetValue(1, myFlags->Upper() > 2 ? myFlags->Value(2) : Standard_False); myFlags->SetInternalArray(aNewArray); + myFlags->SetValue(0, aFlag0); + myFlags->SetValue(1, aFlag1); + myFlags->SetValue(2, aFlag2); } }