Skip to content

Commit bfecd13

Browse files
committed
[TD]fix checkFit to use current scale
1 parent e1f2685 commit bfecd13

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Mod/TechDraw/App/DrawView.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,20 +388,19 @@ bool DrawView::checkFit(void) const
388388
}
389389

390390
//!check if View is too big for page
391-
//should check if unscaled rect is too big for page
392391
bool DrawView::checkFit(TechDraw::DrawPage* p) const
393392
{
394393
bool result = true;
395394
double fudge = 1.1;
396395

397396
double width = 0.0;
398397
double height = 0.0;
399-
QRectF viewBox = getRect(); //rect is scaled
398+
QRectF viewBox = getRect(); //rect is scaled
400399
if (!viewBox.isValid()) {
401400
result = true;
402401
} else {
403-
width = viewBox.width() / getScale(); //unscaled rect w x h
404-
height = viewBox.height() / getScale();
402+
width = viewBox.width(); //scaled rect w x h
403+
height = viewBox.height();
405404
width *= fudge;
406405
height *= fudge;
407406
if ( (width > p->getPageWidth()) ||

src/Mod/TechDraw/TechDrawTools/TDToolsMovers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def simpleViewMove(view, fromPage, toPage, copy):
3636
for d in deps:
3737
toPage.addView(d)
3838

39-
view.recompute() #update the view feature
40-
App.ActiveDocument.recompute() #update views dependents if necessary
39+
App.ActiveDocument.recompute() #update views & dependents if necessary
4140
return
4241

4342
#move a section view, its Base View and all its dependents (items, dimensions, balloons, etc) of both from fromPage to toPage

0 commit comments

Comments
 (0)