1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Hide MenuButton / OptionButton popup on click if it's already visible.

This commit is contained in:
bruvzg
2022-08-23 10:38:51 +03:00
parent b9919fd87d
commit cd095ab64a
3 changed files with 16 additions and 5 deletions

View File

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