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
This commit is contained in:
Abdullah Tahiri
2021-01-14 19:22:15 +01:00
parent d0859f46cb
commit e9c22f93fd

View File

@@ -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());