diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-28 02:25:57 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-28 02:25:57 +0100 |
commit | 1af5f37e4698c2e3c0edf195c23734834d426ea0 (patch) | |
tree | eeef3bc527b487066a0314123cfe0b422cb71dd8 /gtk2_ardour/route_time_axis.cc | |
parent | 73c5bdd3cb08ad0888fafe2f4018c3f2a575340c (diff) |
Restore visible automation lanes (#7914)
On session re-load only automation lanes with events were displayed,
regardless of visibility state. This allowed for inconsistent
state (menu showed them as visible even if they were not).
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 8bd0b8f440..4a723ba16e 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -2045,9 +2045,23 @@ RouteTimeAxisView::add_existing_processor_automation_curves (boost::weak_ptr<Pro } set<Evoral::Parameter> existing; - processor->what_has_data (existing); + /* Also add explicitly visible */ + const std::set<Evoral::Parameter>& automatable = processor->what_can_be_automated (); + for (std::set<Evoral::Parameter>::const_iterator i = automatable.begin(); i != automatable.end(); ++i) { + boost::shared_ptr<AutomationControl> control = boost::dynamic_pointer_cast<AutomationControl>(processor->control(*i, false)); + if (!control) { + continue; + } + /* see also AutomationTimeAxisView::state_id() */ + std::string ctrl_state_id = std::string("automation ") + control->id().to_s(); + bool visible; + if (get_gui_property (ctrl_state_id, "visible", visible) && visible) { + existing.insert (*i); + } + } + for (set<Evoral::Parameter>::iterator i = existing.begin(); i != existing.end(); ++i) { Evoral::Parameter param (*i); |