Skip to content
Permalink
Browse files

don't adapt shape size in case of move

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12266 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Nov 27, 2009
1 parent 7b47623 commit 8cf0ef7a0c045f925fb1b05c880575361ce0e056
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 8cf0ef7

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