+ fixes #0001956: FreeCAD 0.14.370x hangs when attempting to edit sketch containing ellipse

This commit is contained in:
wmayer
2015-12-27 11:44:47 +01:00
parent e98347960d
commit 462ec49297
5 changed files with 73 additions and 4 deletions

View File

@@ -288,7 +288,14 @@ void PropertyConstraintList::Restore(Base::XMLReader &reader)
for (int i = 0; i < count; i++) {
Constraint *newC = new Constraint();
newC->Restore(reader);
values.push_back(newC);
// To keep upward compatibility ignore unknown constraint types
if (newC->Type < Sketcher::NumConstraintTypes) {
values.push_back(newC);
}
else {
// reading a new constraint type which this version cannot handle
delete newC;
}
}
reader.readEndElement("ConstraintList");