From 8e9e205045782b48235ab43b5aabb43fcfccff13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pale=C4=8Dek?= Date: Sun, 16 Jul 2023 00:28:07 +0200 Subject: [PATCH] don't refuse to replace a tile with a selection if the top left of the selection is the same as the replaced tile --- src/editor/overlay_widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/overlay_widget.cpp b/src/editor/overlay_widget.cpp index e6c0b45d9e5..31f790febf8 100644 --- a/src/editor/overlay_widget.cpp +++ b/src/editor/overlay_widget.cpp @@ -564,7 +564,7 @@ EditorOverlayWidget::replace() auto tilemap = m_editor.get_selected_tilemap(); Uint32 replace_tile = tilemap->get_tile_id(static_cast(m_hovered_tile.x), static_cast(m_hovered_tile.y)); //don't do anything if the old and new tiles are the same tile - if (replace_tile == m_editor.get_tiles()->pos(0, 0)) return; + if (m_editor.get_tiles()->m_width == 1 && m_editor.get_tiles()->m_height == 1 && replace_tile == m_editor.get_tiles()->pos(0, 0)) return; tilemap->save_state(); for (int x = 0; x < tilemap->get_width(); ++x)