summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2020-04-06 01:06:10 +0200
committerTomasz Chabora <kobewi4e@gmail.com>2020-04-06 01:19:20 +0200
commitc1023157eb761efcda07c3fa2015517b8a3621e1 (patch)
tree24879a70fa719da1fadf2d3546bf6a806240f046 /scene/gui
parent4a0e99f19746d726a2d9282cc52879c95c5c4ae3 (diff)
Remove Node.get_position_in_parent()
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/control.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 775f863a4f..b4dc37c74f 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -1893,7 +1893,7 @@ static Control *_next_control(Control *p_from) {
return nullptr;
}
- int next = p_from->get_position_in_parent();
+ int next = p_from->get_index();
ERR_FAIL_INDEX_V(next, parent->get_child_count(), nullptr);
for (int i = (next + 1); i < parent->get_child_count(); i++) {
@@ -2032,7 +2032,7 @@ Control *Control::find_prev_valid_focus() const {
} else {
- for (int i = (from->get_position_in_parent() - 1); i >= 0; i--) {
+ for (int i = (from->get_index() - 1); i >= 0; i--) {
Control *c = Object::cast_to<Control>(from->get_parent()->get_child(i));