diff options
author | kobewi <kobewi4e@gmail.com> | 2022-03-12 01:06:45 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-03-12 01:14:03 +0100 |
commit | 42078dec9f592243209f845766409d01c12ac525 (patch) | |
tree | d73198d40081021ae8ab945d58b4482378869c7b /scene/gui/file_dialog.cpp | |
parent | d5076439e44e6eab5732e1d2fc0f30bb6f34e5f9 (diff) | |
download | redot-engine-42078dec9f592243209f845766409d01c12ac525.tar.gz |
Allow negative indexes in ItemList and PopupMenu
Diffstat (limited to 'scene/gui/file_dialog.cpp')
-rw-r--r-- | scene/gui/file_dialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 678229683f..75bed61042 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -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()); |