Allow negative indexes in ItemList and PopupMenu

This commit is contained in:
kobewi
2022-03-12 01:06:45 +01:00
parent d5076439e4
commit 42078dec9f
25 changed files with 163 additions and 59 deletions

View File

@ -176,7 +176,7 @@ void FileDialog::update_dir() {
if (dir_access->get_current_dir().is_network_share_path()) {
_update_drives(false);
drives->add_item(RTR("Network"));
drives->set_item_disabled(drives->get_item_count() - 1, true);
drives->set_item_disabled(-1, true);
drives->select(drives->get_item_count() - 1);
} else {
drives->select(dir_access->get_current_drive());