fix MidiViewBackground keeping track of data note range

This commit is contained in:
Paul Davis 2025-07-08 17:59:57 -06:00
parent a5bfa387b2
commit 5801716a78

View file

@ -375,14 +375,19 @@ MidiViewBackground::update_data_note_range (uint8_t min, uint8_t max)
{ {
bool dirty = false; bool dirty = false;
if (min < _data_note_min) { /* Note: pitches can come and go, so both min and max could be moving
* up or down on any call.
*/
if (min != _data_note_min) {
_data_note_min = min; _data_note_min = min;
dirty = true; dirty = true;
} }
if (max > _data_note_max) { if (max != _data_note_max) {
_data_note_max = max; _data_note_max = max;
dirty = true; dirty = true;
} }
return dirty; return dirty;
} }