From 6b2db55b84d7f2d2ddab32eba04a428f448aca21 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Tue, 6 Jul 2021 13:25:53 +0800 Subject: [PATCH] fix: now always copy original pixmap --- app/graphicsscene.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/graphicsscene.cpp b/app/graphicsscene.cpp index 20ce2b3..7f0b97c 100644 --- a/app/graphicsscene.cpp +++ b/app/graphicsscene.cpp @@ -109,6 +109,11 @@ bool GraphicsScene::trySetTransformationMode(Qt::TransformationMode mode, float QPixmap GraphicsScene::renderToPixmap() { + PGraphicsPixmapItem * pixmapItem = qgraphicsitem_cast(m_theThing); + if (pixmapItem) { + return pixmapItem->pixmap(); + } + QPixmap pixmap(sceneRect().toRect().size()); pixmap.fill(Qt::transparent); QPainter p(&pixmap);