[QGIS Commit] r12266 - trunk/qgis/src/core/composer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Nov 27 02:56:17 EST 2009
Author: mhugent
Date: 2009-11-27 02:56:15 -0500 (Fri, 27 Nov 2009)
New Revision: 12266
Modified:
trunk/qgis/src/core/composer/qgscomposershape.cpp
Log:
don't adapt shape size in case of move
Modified: trunk/qgis/src/core/composer/qgscomposershape.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposershape.cpp 2009-11-27 07:21:13 UTC (rev 12265)
+++ trunk/qgis/src/core/composer/qgscomposershape.cpp 2009-11-27 07:56:15 UTC (rev 12266)
@@ -238,12 +238,17 @@
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 );
}
More information about the QGIS-commit
mailing list