TechDraw: Fix double free when resetting line formats

This commit is contained in:
j-hap
2025-03-17 19:36:32 -03:00
committed by Adrian Insaurralde
parent 1f42e804d7
commit 77269ee53b
+2 -6
View File
@@ -595,12 +595,8 @@ void CosmeticExtension::removeCenterLine(const std::vector<std::string>& delTags
void CosmeticExtension::clearGeomFormats()
{
std::vector<GeomFormat*> noFormats;
std::vector<GeomFormat*> fmts = GeomFormats.getValues();
GeomFormats.setValues(noFormats);
for (auto& f : fmts) {
delete f;
}
// setValues takes care of deletion of old entries as well
GeomFormats.setValues({});
}
//returns unique GF id