[TD]prevent Complex Section with no Base View

This commit is contained in:
wandererfan
2022-11-14 16:03:21 -05:00
committed by WandererFan
parent 33bee19d81
commit 356faf94da
3 changed files with 28 additions and 12 deletions

View File

@@ -801,11 +801,13 @@ Base::Vector3d DrawViewSection::getXDirection() const
//we have an XDirection property
if (DrawUtil::fpCompare(XDirection.getValue().Length(), 0.0)) {
//but it has no value, so we make a value
gp_Ax2 cs = getCSFromBase(SectionDirection.getValueAsString());
gp_Dir gXDir = cs.XDirection();
result = Base::Vector3d(gXDir.X(),
gXDir.Y(),
gXDir.Z());
if (BaseView.getValue()) {
gp_Ax2 cs = getCSFromBase(SectionDirection.getValueAsString());
gp_Dir gXDir = cs.XDirection();
result = Base::Vector3d(gXDir.X(),
gXDir.Y(),
gXDir.Z());
}
} else {
//XDirection is good, so we use it
result = XDirection.getValue();