mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
Piano: Handle octave slider jumps of greater than 1
The previous slider handler relied on the new value being 1 different than the previous. fixes #1163.
This commit is contained in:
parent
0fd31ef598
commit
b8cf07166f
5 changed files with 20 additions and 1 deletions
|
@ -83,7 +83,7 @@ KnobsWidget::KnobsWidget(TrackManager& track_manager, MainWidget& main_widget)
|
|||
m_octave_knob->on_value_changed = [this](int value) {
|
||||
int new_octave = octave_max - value;
|
||||
if (m_change_underlying)
|
||||
m_main_widget.set_octave_and_ensure_note_change(new_octave == m_track_manager.octave() + 1 ? Up : Down);
|
||||
m_main_widget.set_octave_and_ensure_note_change(new_octave);
|
||||
ASSERT(new_octave == m_track_manager.octave());
|
||||
m_octave_value->set_text(String::number(new_octave));
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue