1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-18 17:40:48 +02:00

Compilation fix.

This commit is contained in:
Tomasz Zieliński 2022-09-06 21:30:16 +02:00
parent 0f8adabd71
commit 52ddc9e32b

View File

@ -143,15 +143,19 @@ void MapController::commitObjectErase(int level)
} }
else if (selectedObjects.size() == 1) else if (selectedObjects.size() == 1)
{ {
_map->getEditManager()->removeObject(selectedObjects.front()); _map->getEditManager()->removeObject(*selectedObjects.begin());
//invalidate tiles under object
_mapHandler->invalidate(_mapHandler->geTilesUnderObject(selectedObjects.front()));
} }
else //nothing to erase - shouldn't be here else //nothing to erase - shouldn't be here
{ {
return; return;
} }
for (auto obj : selectedObjects)
{
//invalidate tiles under objects
_mapHandler->invalidate(_mapHandler->geTilesUnderObject(obj));
}
_scenes[level]->selectionObjectsView.clear(); _scenes[level]->selectionObjectsView.clear();
_scenes[level]->objectsView.draw(); _scenes[level]->objectsView.draw();
_scenes[level]->selectionObjectsView.draw(); _scenes[level]->selectionObjectsView.draw();