Skip to content
Permalink
Browse files

[composer] Prevent data defined size of scalebar from being less than…

… calculated minimum size
  • Loading branch information
nyalldawson committed Aug 11, 2014
1 parent ad799c8 commit 856341d484ff2c6099d8f2e13f1cfdcef7433ed6
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/core/composer/qgscomposerscalebar.cpp
@@ -385,7 +385,19 @@ void QgsComposerScaleBar::adjustBoxSize()
QRectF box = mStyle->calculateBoxSize();

//update rect for data defined size and position
setSceneRect( evalItemRect( box ) );
QRectF newRect = evalItemRect( box );

//scale bars have a minimum size, respect that regardless of data defined settings
if ( newRect.width() < box.width() )
{
newRect.setWidth( box.width() );
}
if ( newRect.height() < box.height() )
{
newRect.setHeight( box.height() );
}

setSceneRect( newRect );
}

void QgsComposerScaleBar::update()

0 comments on commit 856341d

Please sign in to comment.
You can’t perform that action at this time.