Merge pull request #58482 from KoBeWi/you_came_to_the_wrong_source

This commit is contained in:
Rémi Verschelde 2022-02-24 09:51:27 +01:00 committed by GitHub
commit ecbeb173e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}