summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorLightning_A <aaronjrecord@gmail.com>2021-06-18 16:02:50 -0600
committerLightning_A <aaronjrecord@gmail.com>2021-06-21 08:39:28 -0600
commit899e5f8685dc10df5b24a1b765803e19224be61c (patch)
treea9d6ad1304f851dac592dae6df9cdf5b3ca2e91f /editor
parent8ffb631cdb740540ae74edaa5cef8a04d263ccee (diff)
Rename `is_a_parent_of()` to `is_ancestor_of()`
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp2
-rw-r--r--editor/editor_help.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp6
4 files changed, 6 insertions, 6 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 807a45eb32..7f91ae28a4 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -117,7 +117,7 @@ void FindReplaceBar::_unhandled_input(const Ref<InputEvent> &p_event) {
}
Control *focus_owner = get_focus_owner();
- if (text_editor->has_focus() || (focus_owner && vbc_lineedit->is_a_parent_of(focus_owner))) {
+ if (text_editor->has_focus() || (focus_owner && vbc_lineedit->is_ancestor_of(focus_owner))) {
bool accepted = true;
switch (k->get_keycode()) {
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 7365e8fd7d..16db465a4a 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1909,7 +1909,7 @@ void FindBar::_unhandled_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
- if (k->is_pressed() && (rich_text_label->has_focus() || is_a_parent_of(get_focus_owner()))) {
+ if (k->is_pressed() && (rich_text_label->has_focus() || is_ancestor_of(get_focus_owner()))) {
bool accepted = true;
switch (k->get_keycode()) {
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 5d248176c1..e648ffff29 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1241,7 +1241,7 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo
Ref<InputEventPanGesture> pan_gesture = p_event;
if (pan_gesture.is_valid() && !p_already_accepted) {
- // If control key pressed, then zoom instead of pan
+ // If ctrl key pressed, then zoom instead of pan.
if (pan_gesture->is_ctrl_pressed()) {
const float factor = pan_gesture->get_delta().y;
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 726f74e67f..911c5147bf 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -6370,7 +6370,7 @@ void Node3DEditor::_request_gizmo(Object *p_obj) {
if (!sp) {
return;
}
- if (editor->get_edited_scene() && (sp == editor->get_edited_scene() || (sp->get_owner() && editor->get_edited_scene()->is_a_parent_of(sp)))) {
+ if (editor->get_edited_scene() && (sp == editor->get_edited_scene() || (sp->get_owner() && editor->get_edited_scene()->is_ancestor_of(sp)))) {
Ref<EditorNode3DGizmo> seg;
for (int i = 0; i < gizmo_plugins_by_priority.size(); ++i) {
@@ -6444,7 +6444,7 @@ void Node3DEditor::_toggle_maximize_view(Object *p_viewport) {
}
void Node3DEditor::_node_added(Node *p_node) {
- if (EditorNode::get_singleton()->get_scene_root()->is_a_parent_of(p_node)) {
+ if (EditorNode::get_singleton()->get_scene_root()->is_ancestor_of(p_node)) {
if (Object::cast_to<WorldEnvironment>(p_node)) {
world_env_count++;
if (world_env_count == 1) {
@@ -6460,7 +6460,7 @@ void Node3DEditor::_node_added(Node *p_node) {
}
void Node3DEditor::_node_removed(Node *p_node) {
- if (EditorNode::get_singleton()->get_scene_root()->is_a_parent_of(p_node)) {
+ if (EditorNode::get_singleton()->get_scene_root()->is_ancestor_of(p_node)) {
if (Object::cast_to<WorldEnvironment>(p_node)) {
world_env_count--;
if (world_env_count == 0) {