AutoScaling Fixes for non-DVP objects

This commit is contained in:
WandererFan
2016-10-27 10:13:23 -04:00
committed by Yorik van Havre
parent 200ed7a675
commit a79d672bbd
7 changed files with 53 additions and 24 deletions

View File

@@ -736,7 +736,15 @@ double DrawViewPart::getBoxY(void) const
QRectF DrawViewPart::getRect() const
{
QRectF result(0.0,0.0,getBoxX(),getBoxY()); //this is from GO and is already scaled
double x = getBoxX();
double y = getBoxY();
QRectF result;
if (std::isinf(x) || std::isinf(y)) {
//geometry isn't created yet. return an arbitrary rect.
result = QRectF(0.0,0.0,100.0,100.0);
} else {
result = QRectF(0.0,0.0,getBoxX(),getBoxY()); //this is from GO and is already scaled
}
return result;
}