2017-06-26 15:43:12 +02:00
|
|
|
#include "eraseritem.hpp"
|
|
|
|
|
|
|
|
EraserItem::EraserItem() {
|
|
|
|
}
|
|
|
|
|
|
|
|
EraserItem::~EraserItem() {
|
|
|
|
}
|
|
|
|
|
2017-07-08 21:40:09 +02:00
|
|
|
void EraserItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
|
2017-06-26 15:43:12 +02:00
|
|
|
for (auto i : scene->items()) {
|
2017-07-08 21:40:09 +02:00
|
|
|
if (i->contains(scene->cursorPosition()) && i->zValue() != -1 && i != scene->polyItm() && i != scene->selRect()) {
|
2017-06-26 15:43:12 +02:00
|
|
|
scene->removeItem(i);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|