mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
fix logic in MidiRegionView::select_matching_notes() to not add notes when asked not to
This commit is contained in:
parent
b7b2189d95
commit
4974369787
1 changed files with 5 additions and 2 deletions
|
|
@ -2362,16 +2362,19 @@ MidiRegionView::select_notes (list<Evoral::event_id_t> notes, bool allow_auditio
|
||||||
void
|
void
|
||||||
MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, bool add, bool extend)
|
MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, bool add, bool extend)
|
||||||
{
|
{
|
||||||
bool have_selection = !_selection.empty();
|
|
||||||
uint8_t low_note = 127;
|
uint8_t low_note = 127;
|
||||||
uint8_t high_note = 0;
|
uint8_t high_note = 0;
|
||||||
MidiModel::Notes& notes (_model->notes());
|
MidiModel::Notes& notes (_model->notes());
|
||||||
_optimization_iterator = _events.begin();
|
_optimization_iterator = _events.begin();
|
||||||
|
|
||||||
if (extend && !have_selection) {
|
if (_selection.empty()) {
|
||||||
extend = false;
|
extend = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!add && !extend && !_selection.empty()) {
|
||||||
|
clear_note_selection ();
|
||||||
|
}
|
||||||
|
|
||||||
/* scan existing selection to get note range */
|
/* scan existing selection to get note range */
|
||||||
|
|
||||||
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
|
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue