Disallow drawing heal locations
This commit is contained in:
parent
399474c1f2
commit
ac92534576
1 changed files with 8 additions and 4 deletions
|
@ -1067,10 +1067,14 @@ void Editor::mouseEvent_map(QGraphicsSceneMouseEvent *event, MapPixmapItem *item
|
||||||
} else {
|
} else {
|
||||||
// Left-clicking while in paint mode will add a new event of the
|
// Left-clicking while in paint mode will add a new event of the
|
||||||
// type of the first currently selected events.
|
// type of the first currently selected events.
|
||||||
DraggablePixmapItem * newEvent = addNewEvent(this->selected_events->first()->event->get("event_type"));
|
// Disallow adding heal locations, deleting them is not possible yet
|
||||||
if (newEvent) {
|
QString eventType = this->selected_events->first()->event->get("event_type");
|
||||||
newEvent->move(x, y);
|
if (eventType != "event_heal_location") {
|
||||||
selectMapEvent(newEvent, false);
|
DraggablePixmapItem * newEvent = addNewEvent(eventType);
|
||||||
|
if (newEvent) {
|
||||||
|
newEvent->move(x, y);
|
||||||
|
selectMapEvent(newEvent, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (map_edit_mode == "select") {
|
} else if (map_edit_mode == "select") {
|
||||||
|
|
Loading…
Reference in a new issue