summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-29 07:40:52 +0200
committerGitHub <noreply@github.com>2021-09-29 07:40:52 +0200
commitad635567b1964c3e573dedd158cf9dab09364fec (patch)
tree385f76b6b2869666120a9afdee99ba88c75aacaf /scene/gui
parent1bf0e875d86325249d5dcecddf69edc274ada8e5 (diff)
parentfc9767abb14348c2236b487f0bc6d18de65a38fd (diff)
Merge pull request #53189 from AnilBK/use-class-specific-funcs
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/graph_edit.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index bca3b2059d..d9c08ec272 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1071,10 +1071,7 @@ void GraphEdit::gui_input(const Ref<InputEvent> &p_ev) {
if (mm.is_valid() && box_selecting) {
box_selecting_to = mm->get_position();
- box_selecting_rect = Rect2(MIN(box_selecting_from.x, box_selecting_to.x),
- MIN(box_selecting_from.y, box_selecting_to.y),
- ABS(box_selecting_from.x - box_selecting_to.x),
- ABS(box_selecting_from.y - box_selecting_to.y));
+ box_selecting_rect = Rect2(box_selecting_from.min(box_selecting_to), (box_selecting_from - box_selecting_to).abs());
for (int i = get_child_count() - 1; i >= 0; i--) {
GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));