Skip to content

Commit 2b901b1

Browse files
StevenBStevenB
StevenB
authored and
StevenB
committedSep 24, 2007
Fixed a bug which sometimes prevented the adding of multiple maps to a
composer page. git-svn-id: http://svn.osgeo.org/qgis/trunk@7217 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3f5d524 commit 2b901b1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ void QgsComposer::on_mActionExportAsImage_activated(void)
674674

675675
//find out the last used filter
676676
QSettings myQSettings; // where we keep last used filter in persistant state
677-
QString myLastUsedFormat = myQSettings.readEntry("/UI/lastSaveAsImageFormat", "PNG" ); //<- BUG #729 is probably here
677+
QString myLastUsedFormat = myQSettings.readEntry("/UI/lastSaveAsImageFormat", "png" );
678678
QString myLastUsedFile = myQSettings.readEntry("/UI/lastSaveAsImageFile","qgis.png");
679679
QFileInfo file(myLastUsedFile);
680680

@@ -686,6 +686,7 @@ void QgsComposer::on_mActionExportAsImage_activated(void)
686686
{
687687
QString myFormat=QString(QImageWriter::supportedImageFormats().at( myCounterInt ));
688688
QString myFilter = myFormat + " " + tr("format") + " (*." + myFormat.lower() + " *." + myFormat.upper() + ")";
689+
689690
if ( myCounterInt > 0 ) myFilters += ";;";
690691
myFilters += myFilter;
691692
myFilterMap[myFilter] = myFormat;

‎src/app/composer/qgscomposermap.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
#include <cmath>
3333

3434
QgsComposerMap::QgsComposerMap ( QgsComposition *composition, int id, int x, int y, int width, int height )
35-
: QWidget(), QGraphicsRectItem(x,y,width,height,0)
35+
: QWidget(), QGraphicsRectItem(0,0,width,height,0)
3636
{
37+
std::cout << "QgsComposerMap::QgsComposerMap()" << std::endl;
38+
3739
setupUi(this);
3840

3941
mComposition = composition;
@@ -47,6 +49,7 @@ QgsComposerMap::QgsComposerMap ( QgsComposition *composition, int id, int x, int
4749
// Add to scene
4850
mComposition->canvas()->addItem(this);
4951

52+
QGraphicsRectItem::setPos(x, y);
5053
QGraphicsRectItem::show();
5154

5255
writeSettings();

0 commit comments

Comments
 (0)
Please sign in to comment.