MCPcopy Create free account
hub / github.com/VCVRack/Rack / updateSelectionFromRect

Method updateSelectionFromRect

src/app/RackWidget.cpp:982–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980}
981
982void RackWidget::updateSelectionFromRect() {
983 math::Rect selectionBox = math::Rect::fromCorners(internal->selectionStart, internal->selectionEnd);
984 deselectAll();
985 for (ModuleWidget* mw : getModules()) {
986 bool selected = internal->selecting && selectionBox.intersects(mw->box);
987 if (selected)
988 select(mw);
989 }
990}
991
992void RackWidget::selectAll() {
993 internal->selectedModules.clear();

Callers

nothing calls this directly

Calls 1

intersectsMethod · 0.80

Tested by

no test coverage detected