From 662a86d1cdedc21fd2ec75df3c6c3b1f776e5e78 Mon Sep 17 00:00:00 2001 From: NyakoFox Date: Thu, 3 Oct 2024 22:13:33 -0300 Subject: [PATCH] Don't commit tile events if removing entities --- desktop_version/src/Editor.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/desktop_version/src/Editor.cpp b/desktop_version/src/Editor.cpp index a7a191eb..c9fc494f 100644 --- a/desktop_version/src/Editor.cpp +++ b/desktop_version/src/Editor.cpp @@ -2512,19 +2512,23 @@ void editorclass::handle_tile_placement(const int tile) void editorclass::tool_remove() { - if (!placing_tiles) - { - placing_tiles = true; - update_old_tiles(); - } - switch (current_tool) { case EditorTool_WALLS: case EditorTool_BACKING: + if (!placing_tiles) + { + placing_tiles = true; + update_old_tiles(); + } handle_tile_placement(0); break; case EditorTool_SPIKES: + if (!placing_tiles) + { + placing_tiles = true; + update_old_tiles(); + } set_tile_interpolated(old_tilex, tilex, old_tiley, tiley, 0); break; default: