summaryrefslogtreecommitdiff
path: root/editor/editor_path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_path.cpp')
-rw-r--r--editor/editor_path.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index f3b3eedccc..3dee06fb3e 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -130,14 +130,14 @@ void EditorPath::update_path() {
name = r->get_name();
}
- if (name == "") {
+ if (name.is_empty()) {
name = r->get_class();
}
} else if (obj->is_class("EditorDebuggerRemoteObject")) {
name = obj->call("get_title");
} else if (Object::cast_to<Node>(obj)) {
name = Object::cast_to<Node>(obj)->get_name();
- } else if (Object::cast_to<Resource>(obj) && Object::cast_to<Resource>(obj)->get_name() != "") {
+ } else if (Object::cast_to<Resource>(obj) && !Object::cast_to<Resource>(obj)->get_name().is_empty()) {
name = Object::cast_to<Resource>(obj)->get_name();
} else {
name = obj->get_class();
@@ -211,7 +211,7 @@ EditorPath::EditorPath(EditorHistory *p_history) {
current_object_label = memnew(Label);
current_object_label->set_clip_text(true);
- current_object_label->set_align(Label::ALIGN_LEFT);
+ current_object_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_LEFT);
current_object_label->set_h_size_flags(SIZE_EXPAND_FILL);
main_hb->add_child(current_object_label);