Skip to content
Snippets Groups Projects
Commit 0b5f2fa5 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

fixed error when exporting map canvas image to clipboard

parent e1af273b
No related branches found
No related tags found
No related merge requests found
......@@ -680,7 +680,11 @@ class MapCanvas(QgsMapCanvas):
:return: QPixmap
"""
#return QPixmap(self.map().contentImage().copy())
return QPixmap.grabWidget(self)
pixmap = QPixmap(self.rect().size())
painter = QPainter(pixmap)
self.render(painter)
return pixmap
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment