mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0023306: Failures reading some attributes of BinOcaf document
Saving OCAF attribute TColStd_Array1OfExtendedString to binary file is corrected (missing data field written).
This commit is contained in:
parent
9db37f0e3c
commit
aa45313282
@ -79,17 +79,21 @@ Standard_Boolean BinMDataStd_ExtStringArrayDriver::Paste
|
||||
}
|
||||
|
||||
if(ok) {
|
||||
#ifdef DEB
|
||||
//cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
|
||||
#endif
|
||||
//#ifdef DEB
|
||||
// cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
|
||||
//#endif
|
||||
Standard_Boolean aDelta(Standard_False);
|
||||
if(BinMDataStd::DocumentVersion() > 2) {
|
||||
Standard_Byte aDeltaValue;
|
||||
if (! (theSource >> aDeltaValue))
|
||||
return Standard_False;
|
||||
if (! (theSource >> aDeltaValue)) {
|
||||
//#ifdef DEB
|
||||
// cout <<"DeltaValue = " << (Standard_Integer)aDeltaValue <<endl;
|
||||
//#endif
|
||||
return Standard_False;
|
||||
}
|
||||
else
|
||||
aDelta = (Standard_Boolean)aDeltaValue;
|
||||
}
|
||||
}
|
||||
anAtt->SetDelta(aDelta);
|
||||
}
|
||||
return ok;
|
||||
@ -113,4 +117,6 @@ void BinMDataStd_ExtStringArrayDriver::Paste
|
||||
theTarget << aFirstInd << aLastInd;
|
||||
for (Standard_Integer i = aFirstInd; i <= aLastInd; i ++)
|
||||
theTarget << anAtt->Value( i );
|
||||
|
||||
theTarget << (Standard_Byte)anAtt->GetDelta();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user