improve way selected events are rendered on top

This commit is contained in:
garak 2019-05-09 00:44:57 -04:00 committed by huderlem
parent cdf39e6eb2
commit eb3964bcc3
2 changed files with 5 additions and 2 deletions

View file

@ -204,7 +204,11 @@ public:
int y = event->getPixelY();
setX(x);
setY(y);
setZValue(event->y());
if (editor->selected_events && editor->selected_events->contains(this)) {
setZValue(event->y() + 1);
} else {
setZValue(event->y());
}
}
void move(int x, int y);
void emitPositionChanged() {

View file

@ -1243,7 +1243,6 @@ void Editor::selectMapEvent(DraggablePixmapItem *object, bool toggle) {
selected_events->append(object);
}
updateSelectedEvents();
object->setZValue(object->y() + 1);
}
}