Skip to content
Permalink
Browse files

don't adapt shape size in case of move

git-svn-id: http://svn.osgeo.org/qgis/trunk@12266 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Nov 27, 2009
1 parent e3fbe08 commit edd32373366fc0fba90e1e5a7b6ea7649b307076
Showing with 11 additions and 6 deletions.
  1. +11 −6 src/core/composer/qgscomposershape.cpp
@@ -238,12 +238,17 @@ void QgsComposerShape::setRotation( double r )

void QgsComposerShape::setSceneRect( const QRectF& rectangle )
{
QgsComposerItem::setSceneRect( rectangle );


//consider to change size of the shape if the rectangle changes width and/or height
double newShapeWidth = rectangle.width();
double newShapeHeight = rectangle.height();
imageSizeConsideringRotation( newShapeWidth, newShapeHeight );
mShapeWidth = newShapeWidth;
mShapeHeight = newShapeHeight;
if(rectangle.width() != rect().width() || rectangle.height() != rect().height())
{
double newShapeWidth = rectangle.width();
double newShapeHeight = rectangle.height();
imageSizeConsideringRotation( newShapeWidth, newShapeHeight );
mShapeWidth = newShapeWidth;
mShapeHeight = newShapeHeight;
}

QgsComposerItem::setSceneRect( rectangle );
}

0 comments on commit edd3237

Please sign in to comment.