We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent ad799c8 commit 856341dCopy full SHA for 856341d
src/core/composer/qgscomposerscalebar.cpp
100755
100644
@@ -385,7 +385,19 @@ void QgsComposerScaleBar::adjustBoxSize()
385
QRectF box = mStyle->calculateBoxSize();
386
387
//update rect for data defined size and position
388
- setSceneRect( evalItemRect( box ) );
+ QRectF newRect = evalItemRect( box );
389
+
390
+ //scale bars have a minimum size, respect that regardless of data defined settings
391
+ if ( newRect.width() < box.width() )
392
+ {
393
+ newRect.setWidth( box.width() );
394
+ }
395
+ if ( newRect.height() < box.height() )
396
397
+ newRect.setHeight( box.height() );
398
399
400
+ setSceneRect( newRect );
401
}
402
403
void QgsComposerScaleBar::update()
0 commit comments