Sketcher: fix lost of constraint in undo/redo

This commit is contained in:
Zheng, Lei
2019-08-23 19:10:58 +08:00
committed by wmayer
parent eb24c84468
commit 7128cf7989
2 changed files with 14 additions and 7 deletions

View File

@@ -4327,6 +4327,16 @@ Restart:
SoSeparator *sep = static_cast<SoSeparator *>(edit->constrGroup->getChild(i));
const Constraint *Constr = *it;
if(Constr->First < -extGeoCount || Constr->First >= intGeoCount
|| (Constr->Second!=Constraint::GeoUndef
&& (Constr->Second < -extGeoCount || Constr->Second >= intGeoCount))
|| (Constr->Third!=Constraint::GeoUndef
&& (Constr->Third < -extGeoCount || Constr->Third >= intGeoCount)))
{
// Constraint can refer to non-existent geometry during undo/redo
continue;
}
// distinquish different constraint types to build up
switch (Constr->Type) {
case Block: