KShare/cropeditor/drawing/eraseritem.cpp
ArsenArsen d0eaec047a Fix the encoder, add rectangles, and add undraw
undraw = way to delete drawings
2017-06-26 15:43:12 +02:00

17 lines
389 B
C++

#include "eraseritem.hpp"
EraserItem::EraserItem() {
}
EraserItem::~EraserItem() {
}
void EraserItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
for (auto i : scene->items()) {
if (i->contains(e->scenePos()) && i->zValue() != -1 && i != scene->polyItm() && i != scene->selRect()) {
scene->removeItem(i);
break;
}
}
}