summaryrefslogtreecommitdiff
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index e978713c34..fbb66744a7 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2399,19 +2399,11 @@ void EditorPropertyResource::_update_menu_items() {
inheritors_array.push_back(t);
- int id = TYPE_BASE_ID + idx;
-
- if (!icon.is_valid() && has_icon(t, "EditorIcons")) {
- icon = get_icon(t, "EditorIcons");
- }
-
- if (icon.is_valid()) {
+ if (!icon.is_valid())
+ icon = get_icon(has_icon(t, "EditorIcons") ? t : "Object", "EditorIcons");
- menu->add_icon_item(icon, vformat(TTR("New %s"), t), id);
- } else {
-
- menu->add_item(vformat(TTR("New %s"), t), id);
- }
+ int id = TYPE_BASE_ID + idx;
+ menu->add_icon_item(icon, vformat(TTR("New %s"), t), id);
idx++;
}
@@ -2615,14 +2607,6 @@ void EditorPropertyResource::update_property() {
get_tree()->call_deferred("call_group", "_editor_resource_properties", "_fold_other_editors", this);
}
opened_editor = true;
- /*
- Button *open_in_editor = memnew(Button);
- open_in_editor->set_text(TTR("Open Editor"));
- open_in_editor->set_icon(get_icon("Edit", "EditorIcons"));
- sub_inspector_vbox->add_child(open_in_editor);
- open_in_editor->connect("pressed", this, "_open_editor_pressed");
- open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER);
- */
}
}
@@ -2652,7 +2636,7 @@ void EditorPropertyResource::update_property() {
assign->set_tooltip("");
} else {
- assign->set_icon(EditorNode::get_singleton()->get_object_icon(res.operator->(), "Node"));
+ assign->set_icon(EditorNode::get_singleton()->get_object_icon(res.operator->(), "Object"));
if (res->get_name() != String()) {
assign->set_text(res->get_name());