From 8474e05e3f2a198576d316c847b6c20b8b2142d5 Mon Sep 17 00:00:00 2001 From: EvanR Date: Fri, 22 May 2009 17:00:49 -0500 Subject: [PATCH] Fixed three bugs in event editor. Box selecting piano roll notes failed to properly allow event editor to modify only those notes. Right click de-selecting all notes in piano roll failed to restore modify-all behavior to event editor. Box selecting in event editor selected notes even if not viewing note on events. All bugs fixed. --- src/eventedit.cpp | 3 ++- src/pianoroll.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/eventedit.cpp b/src/eventedit.cpp index b1f6ce0..59ebd01 100644 --- a/src/eventedit.cpp +++ b/src/eventedit.cpp @@ -575,7 +575,8 @@ void EventEdit::apply_box(){ int M = get_event_mag(e); if(T1>T2){SWAP(T1,T2);} if(M1tick > T1 && e->tick < T2 && M > M2){ + if(e->tick > T1 && e->tick < T2 && M > M2 && + e->type == event_type){ e->selected = 1; } e=e->next; diff --git a/src/pianoroll.cpp b/src/pianoroll.cpp index c0995da..06c95db 100644 --- a/src/pianoroll.cpp +++ b/src/pianoroll.cpp @@ -229,7 +229,6 @@ int PianoRoll::handle(int event){ else if(event_button()==3){//right mouse if(e==NULL){ unselect_all(); - ui->event_edit->redraw(); } else{//set up for deletion @@ -240,6 +239,7 @@ int PianoRoll::handle(int event){ delete_flag = 1; resize_arrow_color = fltk::color(120,60,58); } + ui->event_edit->select_flag = 0; } redraw(); return 1; @@ -819,10 +819,12 @@ void PianoRoll::apply_box(){ if(e->type == MIDI_NOTE_ON && e->tick+e->dur > T1 && e->tick < T2 && N >= N2 && N <= N1){ + ui->event_edit->select_flag = 1; e->selected = 1; } e = e->next; } + } void PianoRoll::apply_insert(){ -- 2.11.4.GIT