Double clicking on warp events takes you to the destination map and warp

This commit is contained in:
Marcus Huderle
2018-07-11 17:53:43 -05:00
parent dc6b82b4dc
commit 74c2766c01
4 changed files with 43 additions and 4 deletions

View File

@@ -1515,13 +1515,15 @@ void DraggablePixmapItem::mouseMoveEvent(QGraphicsSceneMouseEvent *mouse) {
}
void DraggablePixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouse) {
if (clicking) {
this->editor->selectMapEvent(this, mouse->modifiers() & Qt::ControlModifier);
this->editor->updateSelectedEvents();
}
active = false;
}
void DraggablePixmapItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouse) {
if (this->event->get("event_type") == EventType::Warp) {
emit editor->warpEventDoubleClicked(this->event->get("destination_map_name"), this->event->get("destination_warp"));
}
}
QList<DraggablePixmapItem *> *Editor::getObjects() {
QList<DraggablePixmapItem *> *list = new QList<DraggablePixmapItem *>;
for (Event *event : map->getAllEvents()) {