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

Method setModulePosNearest

src/app/RackWidget.cpp:768–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768void RackWidget::setModulePosNearest(ModuleWidget* mw, math::Vec pos) {
769 eachNearestGridPos(pos, [&](math::Vec pos) -> bool {
770 return requestModulePos(mw, pos);
771 });
772}
773
774static bool compareModuleLeft(ModuleWidget* a, ModuleWidget* b) {
775 return a->getGridBox().getLeft() < b->getGridBox().getLeft();

Callers 2

onDragMoveMethod · 0.80
cloneActionMethod · 0.80

Calls 1

eachNearestGridPosFunction · 0.85

Tested by

no test coverage detected