aboutsummaryrefslogtreecommitdiff
path: root/editor/property_editor.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson2017-12-12 22:57:17 +0700
committerPoommetee Ketson2017-12-12 23:04:37 +0700
commit24df9f3707767f94a8b7842a24013aa3709b1805 (patch)
tree6afe7e0d6be6e1d886c2c40e929d9f50301f22f1 /editor/property_editor.cpp
parent55962ce28fec5f06016ed3f66f52e6e84b817dbe (diff)
downloadgodot-24df9f3707767f94a8b7842a24013aa3709b1805.tar.gz
godot-24df9f3707767f94a8b7842a24013aa3709b1805.tar.zst
godot-24df9f3707767f94a8b7842a24013aa3709b1805.zip
Enhance undoredo action name, TTR, cleanup
Diffstat (limited to 'editor/property_editor.cpp')
-rw-r--r--editor/property_editor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 59acd9ded..d22bee40d 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -900,10 +900,10 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
int id = TYPE_BASE_ID + idx;
if (has_icon(t, "EditorIcons")) {
- menu->add_icon_item(get_icon(t, "EditorIcons"), TTR("New") + " " + t, id);
+ menu->add_icon_item(get_icon(t, "EditorIcons"), vformat(TTR("New %s"), t), id);
} else {
- menu->add_item(TTR("New") + " " + t, id);
+ menu->add_item(vformat(TTR("New %s"), t), id);
}
idx++;
@@ -2831,7 +2831,7 @@ void PropertyEditor::update_tree() {
class_descr_cache[type] = descr.word_wrap(80);
}
- sep->set_tooltip(0, TTR("Class:") + " " + p.name + ":\n\n" + class_descr_cache[type]);
+ sep->set_tooltip(0, TTR("Class:") + " " + p.name + (class_descr_cache[type] == "" ? "" : "\n\n" + class_descr_cache[type]));
}
continue;
@@ -2963,7 +2963,7 @@ void PropertyEditor::update_tree() {
descr_cache[classname][propname] = descr;
}
- item->set_tooltip(0, TTR("Property:") + " " + p.name + "\n\n" + descr);
+ item->set_tooltip(0, TTR("Property:") + " " + p.name + (descr == "" ? "" : "\n\n" + descr));
}
Dictionary d;