From e9c22f93fd5942eeef508e4512fa255f2e9be1d2 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Thu, 14 Jan 2021 19:22:15 +0100 Subject: [PATCH] Sketcher: Migrate old construction points as construction ========================================================= Fix that construction points, which did not have the construction flag before, as construction flag was reserved for internal alignment points, are migrated as construction points. Fixes: https://forum.freecadweb.org/viewtopic.php?f=8&t=53466&start=40#p467176 https://forum.freecadweb.org/viewtopic.php?p=467160#p467160 --- src/Mod/Sketcher/App/SketchObject.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index d4f34362de..fc86dea023 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -7574,7 +7574,14 @@ void SketchObject::migrateSketch(void) if(ext->testMigrationType(Part::GeometryMigrationExtension::Construction)) { - GeometryFacade::setConstruction(g, ext->getConstruction()); + auto gf = GeometryFacade::getFacade(g); // at this point IA geometry is already migrated + + bool oldconstr = ext->getConstruction(); + + if( g->getTypeId() == Part::GeomPoint::getClassTypeId() && !gf->isInternalAligned()) + oldconstr = true; + + GeometryFacade::setConstruction(g,oldconstr); } g->deleteExtension(Part::GeometryMigrationExtension::getClassTypeId());