summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-08-23 10:38:51 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-08-23 10:38:51 +0300
commitcd095ab64ad492ef0a775c3ef5b8fa2aa8d0edd5 (patch)
tree4c316343593fabe99c08902d197a1dd91e0dc161 /editor
parentb9919fd87dbac180f2d3ade766a8d074d4224dfe (diff)
downloadredot-engine-cd095ab64ad492ef0a775c3ef5b8fa2aa8d0edd5.tar.gz
Hide MenuButton / OptionButton popup on click if it's already visible.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_path.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 87ebd3e1c1..adbfacd131 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -80,6 +80,11 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) {
}
void EditorPath::_show_popup() {
+ if (sub_objects_menu->is_visible()) {
+ sub_objects_menu->hide();
+ return;
+ }
+
sub_objects_menu->clear();
Size2 size = get_size();