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

Method onDragStart

src/app/ModuleWidget.cpp:444–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444void ModuleWidget::onDragStart(const DragStartEvent& e) {
445 if (e.button == GLFW_MOUSE_BUTTON_LEFT) {
446 // HACK Disable FramebufferWidget redrawing subpixels while dragging
447 APP->window->fbDirtyOnSubpixelChange() = false;
448
449 // Clear dragRack so dragging in not enabled until mouse is moved a bit.
450 internal->dragRackPos = math::Vec(NAN, NAN);
451
452 // Prepare initial position of modules for history.
453 APP->scene->rack->updateModuleOldPositions();
454 }
455}
456
457void ModuleWidget::onDragEnd(const DragEndEvent& e) {
458 if (e.button == GLFW_MOUSE_BUTTON_LEFT) {

Callers

nothing calls this directly

Calls 2

VecClass · 0.85

Tested by

no test coverage detected