summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric M <itsjusteza@gmail.com>2020-09-07 22:09:53 +1000
committerEric M <itsjusteza@gmail.com>2020-09-07 22:09:53 +1000
commit54bef223fde06ff7031f2f83a6e67714d842c4d1 (patch)
tree4fbcea1524c81b31107c8dbdc58313f084f31091
parentceed52493696dd7bc7559040ecb98b225fc0754c (diff)
Fixed expand/collapse folder option not showing in FileSystemDock
-rw-r--r--editor/filesystem_dock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 31903c89be..0071f169ac 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -2300,6 +2300,7 @@ void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos) {
// Right click is pressed in the tree.
Vector<String> paths = _tree_get_selected(false);
+ tree_popup->clear();
if (paths.size() == 1) {
if (paths[0].ends_with("/")) {
tree_popup->add_icon_item(get_theme_icon("GuiTreeArrowDown", "EditorIcons"), TTR("Expand All"), FOLDER_EXPAND_ALL);
@@ -2310,7 +2311,6 @@ void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos) {
// Popup.
if (!paths.empty()) {
- tree_popup->clear();
tree_popup->set_size(Size2(1, 1));
_file_and_folders_fill_popup(tree_popup, paths);
tree_popup->set_position(tree->get_screen_position() + p_pos);