[TD]fix checkFit to use current scale

This commit is contained in:
Wanderer Fan
2022-05-22 12:05:32 -04:00
committed by WandererFan
parent c1442ee1d4
commit 68ca847c56
2 changed files with 4 additions and 6 deletions

View File

@@ -388,7 +388,6 @@ bool DrawView::checkFit(void) const
}
//!check if View is too big for page
//should check if unscaled rect is too big for page
bool DrawView::checkFit(TechDraw::DrawPage* p) const
{
bool result = true;
@@ -396,12 +395,12 @@ bool DrawView::checkFit(TechDraw::DrawPage* p) const
double width = 0.0;
double height = 0.0;
QRectF viewBox = getRect(); //rect is scaled
QRectF viewBox = getRect(); //rect is scaled
if (!viewBox.isValid()) {
result = true;
} else {
width = viewBox.width() / getScale(); //unscaled rect w x h
height = viewBox.height() / getScale();
width = viewBox.width(); //scaled rect w x h
height = viewBox.height();
width *= fudge;
height *= fudge;
if ( (width > p->getPageWidth()) ||

View File

@@ -36,8 +36,7 @@ def simpleViewMove(view, fromPage, toPage, copy):
for d in deps:
toPage.addView(d)
view.recompute() #update the view feature
App.ActiveDocument.recompute() #update views dependents if necessary
App.ActiveDocument.recompute() #update views & dependents if necessary
return
#move a section view, its Base View and all its dependents (items, dimensions, balloons, etc) of both from fromPage to toPage