Skip to content

Commit

Permalink
Add Alt rubberband to macro sliders (#5623)
Browse files Browse the repository at this point in the history
Closes #5621
  • Loading branch information
mkruselj authored Dec 11, 2021
1 parent 320f685 commit 68f4646
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/surge-xt/gui/widgets/ModulationSourceButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,9 @@ void ModulationSourceButton::onSkinChanged()
void ModulationSourceButton::mouseUp(const juce::MouseEvent &event)
{
setMouseCursor(juce::MouseCursor::NormalCursor);

transientArmed = false;

if (mouseMode == CLICK || mouseMode == CLICK_ARROW)
{
notifyValueChanged();
Expand Down Expand Up @@ -490,6 +492,12 @@ void ModulationSourceButton::mouseUp(const juce::MouseEvent &event)
juce::Desktop::getInstance().getMainMouseSource().setScreenPosition(p);
}

if (event.mods.isAltDown())
{
value = valAtMouseDown;
notifyValueChanged();
}

notifyEndEdit();
}

Expand Down

0 comments on commit 68f4646

Please sign in to comment.