Small cleanup
This commit is contained in:
parent
a2b973d34e
commit
dc5ce7649a
@ -29,7 +29,7 @@ CropEditor::~CropEditor()
|
|||||||
|
|
||||||
void CropEditor::crop(QRect rect)
|
void CropEditor::crop(QRect rect)
|
||||||
{
|
{
|
||||||
QPixmap map = QPixmap::grabWidget(view, rect);
|
QPixmap map = view->grab(rect);
|
||||||
QPixmap *cropp = new QPixmap;
|
QPixmap *cropp = new QPixmap;
|
||||||
map.swap(*cropp);
|
map.swap(*cropp);
|
||||||
delete view;
|
delete view;
|
||||||
|
@ -91,8 +91,6 @@ void CropScene::mouseMoveEvent(QGraphicsSceneMouseEvent *e)
|
|||||||
e->accept();
|
e->accept();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
QGraphicsScene::mouseMoveEvent(e);
|
|
||||||
prevButtons = buttons;
|
prevButtons = buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +102,6 @@ void CropScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *e)
|
|||||||
drawingSelection = nullptr;
|
drawingSelection = nullptr;
|
||||||
}
|
}
|
||||||
prevButtons = Qt::NoButton;
|
prevButtons = Qt::NoButton;
|
||||||
QGraphicsScene::mouseReleaseEvent(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CropScene::keyReleaseEvent(QKeyEvent *event)
|
void CropScene::keyReleaseEvent(QKeyEvent *event)
|
||||||
@ -140,10 +137,9 @@ void CropScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *e)
|
|||||||
e->accept();
|
e->accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CropScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e)
|
void CropScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *)
|
||||||
{
|
{
|
||||||
done();
|
done();
|
||||||
QGraphicsScene::mouseDoubleClickEvent(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CropScene::done()
|
void CropScene::done()
|
||||||
|
Loading…
Reference in New Issue
Block a user