Skip to content
Permalink
Browse files
Fixed a bug which sometimes prevented the adding of multiple maps to a
composer page.


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7217 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
StevenB authored and StevenB committed Sep 24, 2007
1 parent a2319f4 commit f4e666334d921ee57cecd6acb8f296bab919954a
Showing with 6 additions and 2 deletions.
  1. +2 −1 src/app/composer/qgscomposer.cpp
  2. +4 −1 src/app/composer/qgscomposermap.cpp
@@ -674,7 +674,7 @@ void QgsComposer::on_mActionExportAsImage_activated(void)

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

@@ -686,6 +686,7 @@ void QgsComposer::on_mActionExportAsImage_activated(void)
{
QString myFormat=QString(QImageWriter::supportedImageFormats().at( myCounterInt ));
QString myFilter = myFormat + " " + tr("format") + " (*." + myFormat.lower() + " *." + myFormat.upper() + ")";

if ( myCounterInt > 0 ) myFilters += ";;";
myFilters += myFilter;
myFilterMap[myFilter] = myFormat;
@@ -32,8 +32,10 @@
#include <cmath>

QgsComposerMap::QgsComposerMap ( QgsComposition *composition, int id, int x, int y, int width, int height )
: QWidget(), QGraphicsRectItem(x,y,width,height,0)
: QWidget(), QGraphicsRectItem(0,0,width,height,0)
{
std::cout << "QgsComposerMap::QgsComposerMap()" << std::endl;

setupUi(this);

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

QGraphicsRectItem::setPos(x, y);
QGraphicsRectItem::show();

writeSettings();

0 comments on commit f4e6663

Please sign in to comment.