mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 14:13:10 +00:00
Fixed issue where Extend Script option would show up even without script attached to the node
(cherry picked from commit dc361d3201
)
This commit is contained in:
parent
56d3abdbcc
commit
2c88a947c1
@ -873,7 +873,12 @@ void EditorScriptPicker::set_create_options(Object *p_menu_node) {
|
||||
}
|
||||
|
||||
menu_node->add_icon_item(get_icon("ScriptCreate", "EditorIcons"), TTR("New Script"), OBJ_MENU_NEW_SCRIPT);
|
||||
menu_node->add_icon_item(get_icon("ScriptExtend", "EditorIcons"), TTR("Extend Script"), OBJ_MENU_EXTEND_SCRIPT);
|
||||
if (script_owner) {
|
||||
Ref<Script> script = script_owner->get_script();
|
||||
if (script.is_valid()) {
|
||||
menu_node->add_icon_item(get_icon("ScriptExtend", "EditorIcons"), TTR("Extend Script"), OBJ_MENU_EXTEND_SCRIPT);
|
||||
}
|
||||
}
|
||||
menu_node->add_separator();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user