summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2023-09-26 15:21:54 +0200
committerkobewi <kobewi4e@gmail.com>2023-09-26 16:47:33 +0200
commite30e84d77a7be4ab2867e92354d06e8f509b490f (patch)
tree5a1026a0c0b97bdd7774da997476ca25146e199c
parent36945dad0730ee013547493df60c4c59567b4290 (diff)
downloadredot-engine-e30e84d77a7be4ab2867e92354d06e8f509b490f.tar.gz
Fix submenus deleted accidentally
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp2
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp2
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp2
-rw-r--r--editor/plugins/font_config_plugin.cpp2
-rw-r--r--editor/scene_tree_dock.cpp4
5 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 135c79f521..89c21ddb68 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -68,7 +68,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) || (mb->get_button_index() == MouseButton::LEFT && tool_create->is_pressed()))) {
if (!read_only) {
- menu->clear();
+ menu->clear(false);
animations_menu->clear();
animations_to_add.clear();
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 9707c9ee05..3bc5e0c807 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -114,7 +114,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) || (mb->get_button_index() == MouseButton::LEFT && tool_create->is_pressed()))) {
if (!read_only) {
- menu->clear();
+ menu->clear(false);
animations_menu->clear();
animations_to_add.clear();
List<StringName> classes;
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 998276329b..f25f6ccd04 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -557,7 +557,7 @@ void AnimationNodeStateMachineEditor::_open_menu(const Vector2 &p_position) {
return;
}
- menu->clear();
+ menu->clear(false);
animations_menu->clear();
animations_to_add.clear();
diff --git a/editor/plugins/font_config_plugin.cpp b/editor/plugins/font_config_plugin.cpp
index 6de2549059..a0500bdb48 100644
--- a/editor/plugins/font_config_plugin.cpp
+++ b/editor/plugins/font_config_plugin.cpp
@@ -670,7 +670,7 @@ void EditorPropertyOTFeatures::update_property() {
}
// Update add menu items.
- menu->clear();
+ menu->clear(false);
bool have_sub[FGRP_MAX];
for (int i = 0; i < FGRP_MAX; i++) {
menu_sub[i]->clear();
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index d2dab07090..d7c6cb04a4 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -2924,7 +2924,7 @@ void SceneTreeDock::_add_children_to_popup(Object *p_obj, int p_depth) {
void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
if (!EditorNode::get_singleton()->get_edited_scene()) {
- menu->clear();
+ menu->clear(false);
if (profile_allow_editing) {
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("Add")), ED_GET_SHORTCUT("scene_tree/add_child_node"), TOOL_NEW);
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("Instance")), ED_GET_SHORTCUT("scene_tree/instantiate_scene"), TOOL_INSTANTIATE);
@@ -2943,7 +2943,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
return;
}
- menu->clear();
+ menu->clear(false);
Ref<Script> existing_script;
bool existing_script_removable = true;