[TD]Handle missing XDirection on old files

This commit is contained in:
wandererfan
2019-11-22 20:36:27 -05:00
committed by WandererFan
parent cd2764fcb9
commit 9381d4cb9f
5 changed files with 71 additions and 9 deletions

View File

@@ -216,6 +216,15 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute(void)
return DrawView::execute();
}
bool haveX = checkXDirection();
if (!haveX) {
//block touch/onChanged stuff
Base::Vector3d newX = getXDirection();
XDirection.setValue(newX);
XDirection.purgeTouched(); //don't trigger updates!
//unblock
}
Base::Vector3d anchor = AnchorPoint.getValue(); //this is a 2D point (in unrotated coords)
Base::Vector3d dirDetail = dvp->Direction.getValue();