TopoNaming: Enable migration code for 1.0.X -> 1.1 (#26538)
This commit is contained in:
@@ -200,12 +200,12 @@ const std::string& ComplexGeoData::elementMapPrefix()
|
||||
|
||||
std::string ComplexGeoData::getElementMapVersion() const
|
||||
{
|
||||
return "4";
|
||||
return "5";
|
||||
}
|
||||
|
||||
bool ComplexGeoData::checkElementMapVersion(const char* ver) const
|
||||
{
|
||||
return !boost::equals(ver, "3") && !boost::equals(ver, "4") && !boost::starts_with(ver, "3.");
|
||||
return !boost::ends_with(ver, "5");
|
||||
}
|
||||
|
||||
size_t ComplexGeoData::getElementMapSize(bool flush) const
|
||||
|
||||
@@ -492,7 +492,7 @@ void PropertyPartShape::Restore(Base::XMLReader& reader)
|
||||
if (owner ? owner->checkElementMapVersion(this, _Ver.c_str())
|
||||
: _Shape.checkElementMapVersion(_Ver.c_str())) {
|
||||
auto ver = owner ? owner->getElementMapVersion(this) : _Shape.getElementMapVersion();
|
||||
if (!owner || !owner->getNameInDocument() || !_Shape.getElementMapSize()) {
|
||||
if (!owner || !owner->getNameInDocument()) {
|
||||
_Ver = ver;
|
||||
}
|
||||
else {
|
||||
@@ -507,6 +507,10 @@ void PropertyPartShape::Restore(Base::XMLReader& reader)
|
||||
);
|
||||
}
|
||||
owner->getDocument()->addRecomputeObject(owner);
|
||||
|
||||
// sometimes objects will not update _Ver properly,
|
||||
// so lets do it here to avoid unnecessary remigration
|
||||
_Ver = ver;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user