summaryrefslogtreecommitdiff
path: root/DevTools/VisualBuilder/VBForm.cpp
diff options
context:
space:
mode:
authorrhin123 <ryanrhin@gmail.com>2019-09-05 19:01:54 -0500
committerAndreas Kling <awesomekling@gmail.com>2019-09-06 07:17:57 +0200
commit8fc2034ca120b3b69c0620128b94c2b6dd8e15f1 (patch)
tree7418624e1262f8c5a2875f978b2b02bd7e4d3ef0 /DevTools/VisualBuilder/VBForm.cpp
parent7a906ab539c820470a647e6df37ad8367304cef8 (diff)
downloadserenity-8fc2034ca120b3b69c0620128b94c2b6dd8e15f1.zip
VBForm: Fixed cursor not changing on resize /w multiple selections
We were resetting the cursor during multiple selections since our mouse can only be over a single widget at a time.
Diffstat (limited to 'DevTools/VisualBuilder/VBForm.cpp')
-rw-r--r--DevTools/VisualBuilder/VBForm.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/DevTools/VisualBuilder/VBForm.cpp b/DevTools/VisualBuilder/VBForm.cpp
index d825da7287..5c6db0edf0 100644
--- a/DevTools/VisualBuilder/VBForm.cpp
+++ b/DevTools/VisualBuilder/VBForm.cpp
@@ -291,9 +291,12 @@ void VBForm::mousemove_event(GMouseEvent& event)
set_cursor_type_from_grabber(m_resize_direction);
} else {
- for_each_selected_widget([&](auto& widget) {
- set_cursor_type_from_grabber(widget.grabber_at(event.position()));
- });
+ for (auto& widget : m_selected_widgets) {
+ auto grabber_at = widget->grabber_at(event.position());
+ set_cursor_type_from_grabber(grabber_at);
+ if (grabber_at != Direction::None)
+ break;
+ }
}
}