Remove FileVersion from RestoreDocFile, convert point data back to floats

This commit is contained in:
wmayer
2013-03-29 15:23:51 +01:00
parent 15573eea04
commit b24f0efbc1
43 changed files with 896 additions and 141 deletions

View File

@@ -1127,16 +1127,19 @@ void PropertyFloatList::SaveDocFile (Base::Writer &writer) const
}
}
void PropertyFloatList::RestoreDocFile(Base::Reader &reader, const int FileVersion)
void PropertyFloatList::RestoreDocFile(Base::Reader &reader)
{
Base::InputStream str(reader);
uint32_t uCt=0;
str >> uCt;
std::vector<double> values(uCt);
for (std::vector<double>::iterator it = values.begin(); it != values.end(); ++it) {
if (FileVersion > 0) {
if (reader.getFileVersion() > 0) {
for (std::vector<double>::iterator it = values.begin(); it != values.end(); ++it) {
str >> *it;
} else {
}
}
else {
for (std::vector<double>::iterator it = values.begin(); it != values.end(); ++it) {
float val;
str >> val;
(*it) = val;
@@ -2090,7 +2093,7 @@ void PropertyColorList::SaveDocFile (Base::Writer &writer) const
}
}
void PropertyColorList::RestoreDocFile(Base::Reader &reader, const int FileVersion)
void PropertyColorList::RestoreDocFile(Base::Reader &reader)
{
Base::InputStream str(reader);
uint32_t uCt=0;