Skip to content

Commit 8cf0ef7

Browse files
author
mhugent
committed
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
1 parent 7b47623 commit 8cf0ef7

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/core/composer/qgscomposershape.cpp

+11-6
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,17 @@ void QgsComposerShape::setRotation( double r )
238238

239239
void QgsComposerShape::setSceneRect( const QRectF& rectangle )
240240
{
241-
QgsComposerItem::setSceneRect( rectangle );
241+
242242

243243
//consider to change size of the shape if the rectangle changes width and/or height
244-
double newShapeWidth = rectangle.width();
245-
double newShapeHeight = rectangle.height();
246-
imageSizeConsideringRotation( newShapeWidth, newShapeHeight );
247-
mShapeWidth = newShapeWidth;
248-
mShapeHeight = newShapeHeight;
244+
if(rectangle.width() != rect().width() || rectangle.height() != rect().height())
245+
{
246+
double newShapeWidth = rectangle.width();
247+
double newShapeHeight = rectangle.height();
248+
imageSizeConsideringRotation( newShapeWidth, newShapeHeight );
249+
mShapeWidth = newShapeWidth;
250+
mShapeHeight = newShapeHeight;
251+
}
252+
253+
QgsComposerItem::setSceneRect( rectangle );
249254
}

0 commit comments

Comments
 (0)