Afaik if you set the new extent such that the width/height ration of the
extent is the same as the item's one, it won't change size.
Another possibility is to set the new extent and call setSceneRect()
just after that.
For the scale: QgsComposerMap::setNewScale should not change the item
On 08.05.2013 09:15, Alexander Bruy wrote:
is it possible to change composer map extent (and scale) programmatically
without changing its width and height? When using setNewExtent() method width
and height of the composer map frame
changed and overlaps with other composer elements, so resulting
image looks differently from template.
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
Technical Advisor QGIS Project Steering Committee
Qgis-developer mailing list