diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-24 09:51:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-24 09:51:27 +0100 |
commit | ecbeb173e089f287175e06bdd6570b79250b0658 (patch) | |
tree | 9fd541af5ec347b03f54902d98bef882c357c247 /editor | |
parent | cfc7c78732198a7ebc43b92ed24e7025fdf4bc11 (diff) | |
parent | b727b81468357c202aa1b95e25f1cdfaf618e80f (diff) |
Merge pull request #58482 from KoBeWi/you_came_to_the_wrong_source
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/tiles/tile_map_editor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp index 95cd5683a6..8e3aa4f59d 100644 --- a/editor/plugins/tiles/tile_map_editor.cpp +++ b/editor/plugins/tiles/tile_map_editor.cpp @@ -1347,7 +1347,12 @@ void TileMapEditorTilesPlugin::_stop_dragging() { } if (picked_source >= 0) { - sources_list->set_current(picked_source); + for (int i = 0; i < sources_list->get_item_count(); i++) { + if (int(sources_list->get_item_metadata(i)) == picked_source) { + sources_list->set_current(i); + break; + } + } sources_list->ensure_current_is_visible(); TilesEditorPlugin::get_singleton()->set_sources_lists_current(picked_source); } |