mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	Fix submenus deleted accidentally
This commit is contained in:
		
							parent
							
								
									36945dad07
								
							
						
					
					
						commit
						e30e84d77a
					
				
					 5 changed files with 6 additions and 6 deletions
				
			
		|  | @ -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 (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) { | 		if (!read_only) { | ||||||
| 			menu->clear(); | 			menu->clear(false); | ||||||
| 			animations_menu->clear(); | 			animations_menu->clear(); | ||||||
| 			animations_to_add.clear(); | 			animations_to_add.clear(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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 (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) { | 		if (!read_only) { | ||||||
| 			menu->clear(); | 			menu->clear(false); | ||||||
| 			animations_menu->clear(); | 			animations_menu->clear(); | ||||||
| 			animations_to_add.clear(); | 			animations_to_add.clear(); | ||||||
| 			List<StringName> classes; | 			List<StringName> classes; | ||||||
|  |  | ||||||
|  | @ -557,7 +557,7 @@ void AnimationNodeStateMachineEditor::_open_menu(const Vector2 &p_position) { | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	menu->clear(); | 	menu->clear(false); | ||||||
| 	animations_menu->clear(); | 	animations_menu->clear(); | ||||||
| 	animations_to_add.clear(); | 	animations_to_add.clear(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -670,7 +670,7 @@ void EditorPropertyOTFeatures::update_property() { | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		// Update add menu items.
 | 		// Update add menu items.
 | ||||||
| 		menu->clear(); | 		menu->clear(false); | ||||||
| 		bool have_sub[FGRP_MAX]; | 		bool have_sub[FGRP_MAX]; | ||||||
| 		for (int i = 0; i < FGRP_MAX; i++) { | 		for (int i = 0; i < FGRP_MAX; i++) { | ||||||
| 			menu_sub[i]->clear(); | 			menu_sub[i]->clear(); | ||||||
|  |  | ||||||
|  | @ -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) { | void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { | ||||||
| 	if (!EditorNode::get_singleton()->get_edited_scene()) { | 	if (!EditorNode::get_singleton()->get_edited_scene()) { | ||||||
| 		menu->clear(); | 		menu->clear(false); | ||||||
| 		if (profile_allow_editing) { | 		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("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); | 			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; | 		return; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	menu->clear(); | 	menu->clear(false); | ||||||
| 
 | 
 | ||||||
| 	Ref<Script> existing_script; | 	Ref<Script> existing_script; | ||||||
| 	bool existing_script_removable = true; | 	bool existing_script_removable = true; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 kobewi
						kobewi