File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -238,12 +238,17 @@ void QgsComposerShape::setRotation( double r )
238
238
239
239
void QgsComposerShape::setSceneRect ( const QRectF& rectangle )
240
240
{
241
- QgsComposerItem::setSceneRect ( rectangle );
241
+
242
242
243
243
// 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 );
249
254
}
You can’t perform that action at this time.
0 commit comments