pianoroll: better method structure

This commit is contained in:
Paul Davis
2026-01-07 21:32:52 -07:00
parent 68f5da6434
commit bb869cc178
2 changed files with 9 additions and 1 deletions

View File

@@ -243,7 +243,13 @@ Pianoroll::add_multi_controller_item (Gtk::Menu_Helpers::MenuList&,
void void
Pianoroll::layered_automation_button_clicked () Pianoroll::layered_automation_button_clicked ()
{ {
if ((layered_automation = !layered_automation)) { set_layered_automation (!layered_automation);
}
void
Pianoroll::set_layered_automation (bool yn)
{
if ((layered_automation = yn)) {
layered_automation_button->set_active_state (Gtkmm2ext::ExplicitActive); layered_automation_button->set_active_state (Gtkmm2ext::ExplicitActive);
if (view && view->n_visible_automation() > 1) { if (view && view->n_visible_automation() > 1) {
view->hide_all_automation (); view->hide_all_automation ();

View File

@@ -167,6 +167,8 @@ class Pianoroll : public CueEditor
bool key_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType); bool key_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool key_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType); bool key_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
void set_layered_automation (bool);
void escape (); void escape ();
void session_going_away (); void session_going_away ();