diff --git a/gtk2_ardour/midi_view_background.cc b/gtk2_ardour/midi_view_background.cc index 3fa946263e..9a62e8003a 100644 --- a/gtk2_ardour/midi_view_background.cc +++ b/gtk2_ardour/midi_view_background.cc @@ -375,14 +375,19 @@ MidiViewBackground::update_data_note_range (uint8_t min, uint8_t max) { 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; dirty = true; } - if (max > _data_note_max) { + if (max != _data_note_max) { _data_note_max = max; dirty = true; } + return dirty; }