TopoNaming: Improve ElementMapVersion definition. (#26691)

This change makes the program only mark an object's ElementMapVersion with the "1" prefix if the object has a hasher AND an element map.

(cherry picked from commit 9b64da827a)
This commit is contained in:
drwho495
2026-01-07 16:20:48 +01:00
committed by Max Wilfinger
parent dae6cc2481
commit b3f5a35ef7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -279,7 +279,7 @@ public:
return _elementMap->setElementName(element, name, masterTag, sid, overwrite);
}
bool hasElementMap()
bool hasElementMap() const
{
return _elementMap != nullptr;
}
+1 -1
View File
@@ -1300,7 +1300,7 @@ std::string PropertyComplexGeoData::getElementMapVersion(bool) const
}
auto owner = freecad_cast<DocumentObject*>(getContainer());
std::ostringstream ss;
if (owner && owner->getDocument() && owner->getDocument()->getStringHasher() == data->Hasher) {
if (owner && owner->getDocument() && data->hasElementMap() && data->getElementMapSize() && owner->getDocument()->getStringHasher() == data->Hasher) {
ss << "1.";
}
else {