Merge pull request #23038 from DualMatrix/ugly_names

Made NodePath property display path instead of object name if object is not named.
This commit is contained in:
Rémi Verschelde 2018-10-25 17:27:05 +02:00 committed by GitHub
commit 0b2d1364c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -1860,6 +1860,12 @@ void EditorPropertyNodePath::update_property() {
Node *target_node = base_node->get_node(p);
ERR_FAIL_COND(!target_node);
if (String(target_node->get_name()).find("@") != -1) {
assign->set_icon(Ref<Texture>());
assign->set_text(p);
return;
}
assign->set_text(target_node->get_name());
assign->set_icon(EditorNode::get_singleton()->get_object_icon(target_node, "Node"));
}