MidiViewBackground: make ::maybe_apply_note_range() return bool

Just like ::apply_note_range, to indicate if the range was
actually changed.
This commit is contained in:
Paul Davis
2025-11-17 11:00:50 -07:00
parent 9e9afef527
commit 68c69fb89d
2 changed files with 4 additions and 4 deletions

View File

@@ -231,15 +231,15 @@ MidiViewBackground::maybe_extend_note_range (uint8_t note_num)
}
}
void
bool
MidiViewBackground::maybe_apply_note_range (uint8_t lowest, uint8_t highest, bool to_children, RangeCanMove can_move)
{
if (note_range_set && _lowest_note <= lowest && _highest_note >= highest) {
/* already large enough */
return;
return false;
}
apply_note_range (lowest, highest, to_children, can_move);
return apply_note_range (lowest, highest, to_children, can_move);
}
bool

View File

@@ -118,7 +118,7 @@ class MidiViewBackground : public virtual ViewBackground
};
bool apply_note_range (uint8_t lowest, uint8_t highest, bool to_children, RangeCanMove = RangeCanMove (CanMoveTop|CanMoveBottom));
void maybe_apply_note_range (uint8_t lowest, uint8_t highest, bool to_children, RangeCanMove = RangeCanMove (CanMoveTop|CanMoveBottom));
bool maybe_apply_note_range (uint8_t lowest, uint8_t highest, bool to_children, RangeCanMove = RangeCanMove (CanMoveTop|CanMoveBottom));
/** @return y position, or -1 if hidden */
virtual int y_position () const { return 0; }