[TD]Handle missing XDirection on old files

This commit is contained in:
wandererfan
2019-11-27 07:31:45 -05:00
committed by WandererFan
parent cd2764fcb9
commit 9381d4cb9f
5 changed files with 71 additions and 9 deletions
+10 -1
View File
@@ -131,10 +131,19 @@ bool DrawProjGroupItem::showLock(void) const
return result;
}
App::DocumentObjectExecReturn *DrawProjGroupItem::execute(void)
{
// Base::Console().Message("DPGI::execute(%s)\n",Label.getValue());
bool haveX = checkXDirection();
if (!haveX) {
//block touch/onChanged stuff
Base::Vector3d newX = getXDirection();
XDirection.setValue(newX);
XDirection.purgeTouched(); //don't trigger updates!
//unblock
}
if (DrawUtil::checkParallel(Direction.getValue(),
getXDirection())) {
return new App::DocumentObjectExecReturn("DPGI: Direction and XDirection are parallel");