fix: drag on image transparent pixels for panning viewport
This commit is contained in:
parent
36c7eb1891
commit
5ff49f4885
|
@ -24,7 +24,9 @@ GraphicsScene::~GraphicsScene()
|
|||
void GraphicsScene::showImage(const QPixmap &pixmap)
|
||||
{
|
||||
this->clear();
|
||||
m_theThing = this->addPixmap(pixmap);
|
||||
QGraphicsPixmapItem * pixmapItem = this->addPixmap(pixmap);
|
||||
pixmapItem->setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
|
||||
m_theThing = pixmapItem;
|
||||
this->setSceneRect(m_theThing->boundingRect());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user