diff options
author | Carl Hetherington <carl@carlh.net> | 2008-12-19 18:08:35 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2008-12-19 18:08:35 +0000 |
commit | 331de3dc38e4f8b94fc1ddf224349a4afb91cc75 (patch) | |
tree | db93fbe8388ab10f8c5367a0ba6719ee1c279513 /gtk2_ardour/route_time_axis.cc | |
parent | f6469439f9e07a3ff4f0ec9eadc59b85284e3c0e (diff) |
Fix visibility of automation tracks on reloading sessions.
git-svn-id: svn://localhost/ardour2/branches/3.0@4334 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 09683f314c..37ad45bbfc 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -426,6 +426,7 @@ RouteTimeAxisView::set_state (const XMLNode& node) for (iter = kids.begin(); iter != kids.end(); ++iter) { if ((*iter)->name() == AutomationTimeAxisView::state_node_name) { if ((prop = (*iter)->property ("automation-id")) != 0) { + Evoral::Parameter param = ARDOUR::EventTypeMap::instance().new_parameter(prop->value()); bool show = ((prop = (*iter)->property ("shown")) != 0) && prop->value() == "yes"; create_automation_child(param, show); @@ -434,6 +435,7 @@ RouteTimeAxisView::set_state (const XMLNode& node) } } } + return 0; } @@ -1249,25 +1251,26 @@ RouteTimeAxisView::show_automation(Evoral::Parameter param) return (_show_automation.find(param) != _show_automation.end()); } -/** Retuns NULL if track for \a param doesn't exist. +/** Retuns 0 if track for \a param doesn't exist. */ RouteTimeAxisView::RouteAutomationNode* -RouteTimeAxisView::automation_track(Evoral::Parameter param) +RouteTimeAxisView::automation_track (Evoral::Parameter param) { - map<Evoral::Parameter, RouteAutomationNode*>::iterator i = _automation_tracks.find(param); + map<Evoral::Parameter, RouteAutomationNode*>::iterator i = _automation_tracks.find (param); - if (i != _automation_tracks.end()) + if (i != _automation_tracks.end()) { return i->second; - else - return NULL; + } else { + return 0; + } } /** Shorthand for GainAutomation, etc. */ RouteTimeAxisView::RouteAutomationNode* -RouteTimeAxisView::automation_track(AutomationType type) +RouteTimeAxisView::automation_track (AutomationType type) { - return automation_track(Evoral::Parameter(type)); + return automation_track (Evoral::Parameter(type)); } RouteGroup* |