summaryrefslogtreecommitdiff
path: root/editor/plugins/control_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-11-07 10:01:37 +0100
committerGitHub <noreply@github.com>2022-11-07 10:01:37 +0100
commit2c8498c8a6b242141201319af3021c878784c15c (patch)
treedd21c77746f1e56d9401c7db3c84e8e03528a46a /editor/plugins/control_editor_plugin.cpp
parentbb5b45e95035e1e7ab9d7892553339dff260ff95 (diff)
parent18978881fef542f47b4bc34508ef21607f35f49e (diff)
Merge pull request #68351 from Sauermann/fix-code-simplifications
Code simplifications
Diffstat (limited to 'editor/plugins/control_editor_plugin.cpp')
-rw-r--r--editor/plugins/control_editor_plugin.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp
index bb6092755e..1791f7b420 100644
--- a/editor/plugins/control_editor_plugin.cpp
+++ b/editor/plugins/control_editor_plugin.cpp
@@ -810,19 +810,6 @@ void ControlEditorToolbar::_container_flags_selected(int p_flags, bool p_vertica
undo_redo->commit_action();
}
-Vector2 ControlEditorToolbar::_anchor_to_position(const Control *p_control, Vector2 anchor) {
- ERR_FAIL_COND_V(!p_control, Vector2());
-
- Transform2D parent_transform = p_control->get_transform().affine_inverse();
- Rect2 parent_rect = p_control->get_parent_anchorable_rect();
-
- if (p_control->is_layout_rtl()) {
- return parent_transform.xform(parent_rect.position + Vector2(parent_rect.size.x - parent_rect.size.x * anchor.x, parent_rect.size.y * anchor.y));
- } else {
- return parent_transform.xform(parent_rect.position + Vector2(parent_rect.size.x * anchor.x, parent_rect.size.y * anchor.y));
- }
-}
-
Vector2 ControlEditorToolbar::_position_to_anchor(const Control *p_control, Vector2 position) {
ERR_FAIL_COND_V(!p_control, Vector2());