From a0824735a062288379a89de7b7c8aecf3d0bce8c Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 14 Jul 2024 19:07:17 +0200 Subject: [PATCH] Make sure that selected tile source is remembered --- editor/plugins/tiles/tile_map_layer_editor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/plugins/tiles/tile_map_layer_editor.cpp b/editor/plugins/tiles/tile_map_layer_editor.cpp index 4a595301599..b76e6734140 100644 --- a/editor/plugins/tiles/tile_map_layer_editor.cpp +++ b/editor/plugins/tiles/tile_map_layer_editor.cpp @@ -163,7 +163,10 @@ void TileMapLayerEditorTilesPlugin::_update_tile_set_sources_list() { int old_source = -1; if (old_current > -1) { old_source = sources_list->get_item_metadata(old_current); + } else { + old_source = sources_list->get_meta("old_source", -1); } + sources_list->set_meta("old_source", old_source); sources_list->clear(); TileMapLayer *edited_layer = _get_edited_layer();