Skip to content

Commit

Permalink
don't adapt shape size in case of move
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12266 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 27, 2009
1 parent e3fbe08 commit edd3237
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/core/composer/qgscomposershape.cpp
Expand Up @@ -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.