[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 804629d208
commit c01d6172e9
5 changed files with 71 additions and 9 deletions

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");