Skip to content
Permalink
Browse files
Fix for bug #904: 'no decorations'
git-svn-id: http://svn.osgeo.org/qgis/trunk@7991 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 17, 2008
1 parent ea3288f commit 7c346d91de60c85f409317b7df8efb8590f206d2
Showing with 17 additions and 1 deletion.
  1. +1 −1 src/gui/qgsmapcanvas.cpp
  2. +12 −0 src/gui/qgsmapcanvasmap.cpp
  3. +4 −0 src/gui/qgsmapcanvasmap.h
@@ -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();

@@ -100,3 +100,15 @@ void QgsMapCanvasMap::render()
}
update();
}

QPaintDevice& QgsMapCanvasMap::paintDevice()
{
if (mUseQImageToRender)
{
return mImage;
}
else
{
return mPixmap;
}
}
@@ -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*);

0 comments on commit 7c346d9

Please sign in to comment.