summaryrefslogtreecommitdiff
path: root/editor/scene_tree_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/scene_tree_editor.cpp')
-rw-r--r--editor/scene_tree_editor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 685833da55..f30ad02f5e 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -251,7 +251,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (can_rename) { //should be can edit..
String warning = p_node->get_configuration_warning();
- if (!warning.empty()) {
+ if (!warning.is_empty()) {
item->add_button(0, get_theme_icon("NodeWarning", "EditorIcons"), BUTTON_WARNING, false, TTR("Node configuration warning:") + "\n" + p_node->get_configuration_warning());
}
@@ -754,7 +754,7 @@ void SceneTreeEditor::_renamed() {
ERR_FAIL_COND(!n);
// Empty node names are not allowed, so resets it to previous text and show warning
- if (which->get_text(0).strip_edges().empty()) {
+ if (which->get_text(0).strip_edges().is_empty()) {
which->set_text(0, n->get_name());
EditorNode::get_singleton()->show_warning(TTR("No name provided."));
return;
@@ -765,7 +765,7 @@ void SceneTreeEditor::_renamed() {
error->set_text(TTR("Invalid node name, the following characters are not allowed:") + "\n" + Node::invalid_character);
error->popup_centered();
- if (new_name.empty()) {
+ if (new_name.is_empty()) {
which->set_text(0, n->get_name());
return;
}
@@ -931,7 +931,7 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
next = tree->get_next_selected(next);
}
- if (selected.empty()) {
+ if (selected.is_empty()) {
return Variant();
}
@@ -1150,8 +1150,8 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
}
tree = memnew(Tree);
- tree->set_anchor(MARGIN_RIGHT, ANCHOR_END);
- tree->set_anchor(MARGIN_BOTTOM, ANCHOR_END);
+ tree->set_anchor(SIDE_RIGHT, ANCHOR_END);
+ tree->set_anchor(SIDE_BOTTOM, ANCHOR_END);
tree->set_begin(Point2(0, p_label ? 18 : 0));
tree->set_end(Point2(0, 0));
tree->add_theme_constant_override("button_margin", 0);