fix bucket fills for CollisionPixmapItem

This commit is contained in:
garakmon 2020-08-19 00:30:02 -04:00 committed by garak
parent 9fb938939f
commit 2b55e49933

View file

@ -59,8 +59,8 @@ void CollisionPixmapItem::paint(QGraphicsSceneMouseEvent *event) {
} }
void CollisionPixmapItem::floodFill(QGraphicsSceneMouseEvent *event) { void CollisionPixmapItem::floodFill(QGraphicsSceneMouseEvent *event) {
if (event->type() != QEvent::GraphicsSceneMouseRelease) { if (event->type() == QEvent::GraphicsSceneMouseRelease) {
// do nothing this->actionId_++;
} else if (map) { } else if (map) {
Blockdata *oldCollision = map->layout->blockdata->copy(); Blockdata *oldCollision = map->layout->blockdata->copy();
@ -82,8 +82,8 @@ void CollisionPixmapItem::floodFill(QGraphicsSceneMouseEvent *event) {
} }
void CollisionPixmapItem::magicFill(QGraphicsSceneMouseEvent *event) { void CollisionPixmapItem::magicFill(QGraphicsSceneMouseEvent *event) {
if (event->type() != QEvent::GraphicsSceneMouseRelease) { if (event->type() == QEvent::GraphicsSceneMouseRelease) {
// do nothing this->actionId_++;
} else if (map) { } else if (map) {
Blockdata *oldCollision = map->layout->blockdata->copy(); Blockdata *oldCollision = map->layout->blockdata->copy();
QPointF pos = event->pos(); QPointF pos = event->pos();