summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Huelin <62965063+SirQuartz@users.noreply.github.com>2021-07-31 16:33:38 -0400
committerGitHub <noreply@github.com>2021-07-31 16:33:38 -0400
commit3ffd75107d140046112a2e83bf7bce662d5a39b7 (patch)
tree9f1630d0ff222495342ad516cec4b00fa78dd281
parent00ce2d41ca164c33e75b045e1078113bf6002cad (diff)
Make the "View" menu in 3D view toolbar stay open when selecting a checkbox
This pull request fixes an issue where the "View" menu in the 3D view toolbar would close when you selected either the "View Origin" or "View Grid" checkboxes. This was inconvenient and wasted time by making you have to reopen the menu in order to get to other settings anytime you changed this.
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index b1f4baac13..8a6f5b4671 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -7198,7 +7198,9 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) {
hbc_menu->add_child(context_menu_container);
_update_context_menu_stylebox();
+ // Get the view menu popup and have it stay open when a checkable item is selected
p = view_menu->get_popup();
+ p->set_hide_on_checkable_item_selection(false);
accept = memnew(AcceptDialog);
editor->get_gui_base()->add_child(accept);