Skip to content

Commit

Permalink
Fix for bug #904: 'no decorations'
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7991 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 17, 2008
1 parent 29d77c0 commit bbe6908
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -368,7 +368,7 @@ void QgsMapCanvas::refresh()

// notify any listeners that rendering is complete
QPainter p;
p.begin(&mMap->pixmap());
p.begin(&mMap->paintDevice());
emit renderComplete(&p);
p.end();

Expand Down
12 changes: 12 additions & 0 deletions src/gui/qgsmapcanvasmap.cpp
Expand Up @@ -100,3 +100,15 @@ void QgsMapCanvasMap::render()
}
update();
}

QPaintDevice& QgsMapCanvasMap::paintDevice()
{
if (mUseQImageToRender)
{
return mImage;
}
else
{
return mPixmap;
}
}
4 changes: 4 additions & 0 deletions src/gui/qgsmapcanvasmap.h
Expand Up @@ -45,7 +45,11 @@ class GUI_EXPORT QgsMapCanvasMap : public QGraphicsRectItem

void setPanningOffset(const QPoint& point);

//deprecated. Please use paintDevice() function
//which is also save in case QImage is used
QPixmap& pixmap() { return mPixmap; }

QPaintDevice& paintDevice();

void paint(QPainter* p, const QStyleOptionGraphicsItem*, QWidget*);

Expand Down

0 comments on commit bbe6908

Please sign in to comment.