Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
StevenB authored and StevenB committed Sep 24, 2007
1 parent 3f5d524 commit 2b901b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/composer/qgscomposer.cpp
Expand Up @@ -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);

Expand All @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion src/app/composer/qgscomposermap.cpp
Expand Up @@ -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;
Expand All @@ -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();
Expand Down

0 comments on commit 2b901b1

Please sign in to comment.