Merge pull request #27931 from pyrophone/SceneTreeScriptFix

Fix for additional separators appearing when scripts are disabled
This commit is contained in:
Rémi Verschelde 2019-04-15 10:24:37 +02:00 committed by GitHub
commit 87ab468b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2215,10 +2215,10 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_icon_shortcut(get_icon("ScriptRemove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT);
menu->add_icon_shortcut(get_icon("ScriptExtend", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/extend_script"), TOOL_ATTACH_SCRIPT);
}
menu->add_separator();
}
if (profile_allow_editing) {
menu->add_separator();
if (selection.size() == 1) {
menu->add_icon_shortcut(get_icon("Rename", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/rename"), TOOL_RENAME);
}