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:
@@ -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
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user