diff --git a/DevTools/VisualBuilder/VBForm.cpp b/DevTools/VisualBuilder/VBForm.cpp index d825da7287b..5c6db0edf0f 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; + } } }