fix logic of showing/hiding active/inactive pianoroll automation
This commit is contained in:
@@ -1569,6 +1569,11 @@ Pianoroll::automation_active_button_click (Evoral::ParameterType type, int id)
|
||||
if (view) {
|
||||
Evoral::Parameter p (type, _visible_channel, id);
|
||||
|
||||
if (view->is_active_automation (p)) {
|
||||
view->unset_active_automation ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!layered_automation && !view->is_visible_automation (p)) {
|
||||
view->hide_all_automation ();
|
||||
}
|
||||
|
||||
@@ -588,13 +588,6 @@ PianorollMidiView::unset_active_automation ()
|
||||
}
|
||||
}
|
||||
|
||||
/* If the currently active automation is the only one visible, hide it */
|
||||
|
||||
if (active_automation->visible && visible == 1) {
|
||||
active_automation->hide ();
|
||||
set_height (_height);
|
||||
}
|
||||
|
||||
active_automation = nullptr;
|
||||
|
||||
AutomationStateChange(); /* EMIT SIGNAL */
|
||||
|
||||
@@ -66,6 +66,7 @@ class PianorollMidiView : public MidiView
|
||||
void hide_all_automation ();
|
||||
void swap_automation_channel (int);
|
||||
void set_active_automation (Evoral::Parameter const &);
|
||||
void unset_active_automation ();
|
||||
bool is_active_automation (Evoral::Parameter const &) const;
|
||||
bool is_visible_automation (Evoral::Parameter const &) const;
|
||||
size_t n_visible_automation () const;
|
||||
@@ -143,7 +144,6 @@ class PianorollMidiView : public MidiView
|
||||
|
||||
AutomationDisplayState* find_or_create_automation_display_state (Evoral::Parameter const &);
|
||||
void internal_set_active_automation (AutomationDisplayState&);
|
||||
void unset_active_automation ();
|
||||
|
||||
bool midi_canvas_group_event (GdkEvent*);
|
||||
bool automation_group_event (GdkEvent*);
|
||||
|
||||
Reference in New Issue
Block a user