From 52ddc9e32b137997f04e2b24a68ce7ab76af5751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Tue, 6 Sep 2022 21:30:16 +0200 Subject: [PATCH] Compilation fix. --- mapeditor/mapcontroller.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mapeditor/mapcontroller.cpp b/mapeditor/mapcontroller.cpp index 2f5f4b59d..f7b4fddde 100644 --- a/mapeditor/mapcontroller.cpp +++ b/mapeditor/mapcontroller.cpp @@ -143,15 +143,19 @@ void MapController::commitObjectErase(int level) } else if (selectedObjects.size() == 1) { - _map->getEditManager()->removeObject(selectedObjects.front()); - //invalidate tiles under object - _mapHandler->invalidate(_mapHandler->geTilesUnderObject(selectedObjects.front())); + _map->getEditManager()->removeObject(*selectedObjects.begin()); } else //nothing to erase - shouldn't be here { return; } + for (auto obj : selectedObjects) + { + //invalidate tiles under objects + _mapHandler->invalidate(_mapHandler->geTilesUnderObject(obj)); + } + _scenes[level]->selectionObjectsView.clear(); _scenes[level]->objectsView.draw(); _scenes[level]->selectionObjectsView.draw();