summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/automation_time_axis.cc8
-rw-r--r--gtk2_ardour/route_time_axis.cc2
-rw-r--r--gtk2_ardour/route_time_axis.h2
-rw-r--r--gtk2_ardour/route_ui.cc11
-rw-r--r--gtk2_ardour/route_ui.h3
-rw-r--r--gtk2_ardour/time_axis_view.h2
6 files changed, 16 insertions, 12 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 63c755139d..ba76f68e18 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -193,9 +193,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session* s, boost::shared_ptr<Ro
controls_base_unselected_name = X_("AutomationTrackControlsBase");
controls_ebox.set_name (controls_base_unselected_name);
- XMLNode* xml_node = get_parent_with_state()->get_automation_child_xml_node (
- _control->parameter(), Stateful::loading_state_version
- );
+ XMLNode* xml_node = get_parent_with_state()->get_automation_child_xml_node (_control->parameter());
if (xml_node) {
set_state (*xml_node, Stateful::loading_state_version);
@@ -404,7 +402,7 @@ AutomationTimeAxisView::set_height (uint32_t h)
TimeAxisView* state_parent = get_parent_with_state ();
assert(state_parent);
- XMLNode* xml_node = state_parent->get_automation_child_xml_node (_control->parameter(), Stateful::loading_state_version);
+ XMLNode* xml_node = state_parent->get_automation_child_xml_node (_control->parameter());
TimeAxisView::set_height (h);
_base_rect->property_y2() = h;
@@ -995,7 +993,7 @@ AutomationTimeAxisView::get_state_node ()
TimeAxisView* state_parent = get_parent_with_state ();
if (state_parent) {
- return state_parent->get_automation_child_xml_node (_control->parameter(), Stateful::loading_state_version);
+ return state_parent->get_automation_child_xml_node (_control->parameter());
} else {
return 0;
}
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 18ffce84ae..9a631f6941 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -2391,7 +2391,7 @@ RouteTimeAxisView::create_gain_automation_child (const Evoral::Parameter& param,
error << "Route has no gain automation, unable to add automation track view." << endmsg;
return;
}
-
+
gain_track.reset (new AutomationTimeAxisView (_session,
_route, _route->amp(), c,
_editor,
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h
index 53a9e47004..c3e122704d 100644
--- a/gtk2_ardour/route_time_axis.h
+++ b/gtk2_ardour/route_time_axis.h
@@ -117,7 +117,7 @@ public:
/* make sure we get the right version of this */
- XMLNode* get_automation_child_xml_node (Evoral::Parameter param, int version) { return RouteUI::get_automation_child_xml_node (param, version); }
+ XMLNode* get_automation_child_xml_node (Evoral::Parameter param) { return RouteUI::get_automation_child_xml_node (param); }
typedef std::map<Evoral::Parameter, boost::shared_ptr<AutomationTimeAxisView> > AutomationTracks;
AutomationTracks automation_tracks() { return _automation_tracks; }
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 6a79ce0282..b69c6aaeeb 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -94,6 +94,7 @@ RouteUI::init ()
{
self_destruct = true;
xml_node = 0;
+ _xml_node_version = Stateful::current_state_version;
mute_menu = 0;
solo_menu = 0;
sends_menu = 0;
@@ -1266,12 +1267,15 @@ RouteUI::ensure_xml_node ()
if ((xml_node = _route->extra_xml ("GUI")) == 0) {
xml_node = new XMLNode ("GUI");
_route->add_extra_xml (*xml_node);
+ } else {
+ /* the Route has one, so it must have been loaded */
+ _xml_node_version = Stateful::loading_state_version;
}
}
}
XMLNode*
-RouteUI::get_automation_child_xml_node (Evoral::Parameter param, int version)
+RouteUI::get_automation_child_xml_node (Evoral::Parameter param)
{
ensure_xml_node ();
@@ -1282,15 +1286,16 @@ RouteUI::get_automation_child_xml_node (Evoral::Parameter param, int version)
for (iter = kids.begin(); iter != kids.end(); ++iter) {
- if (version < 3000) {
+ if (_xml_node_version < 3000) {
if ((*iter)->name() == sym) {
return *iter;
}
} else {
if ((*iter)->name() == AutomationTimeAxisView::state_node_name) {
XMLProperty* type = (*iter)->property("automation-id");
- if (type && type->value() == sym)
+ if (type && type->value() == sym) {
return *iter;
+ }
}
}
}
diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h
index 952b39a433..444b45147e 100644
--- a/gtk2_ardour/route_ui.h
+++ b/gtk2_ardour/route_ui.h
@@ -110,8 +110,9 @@ class RouteUI : public virtual AxisView
XMLNode *xml_node;
void ensure_xml_node ();
+ int _xml_node_version;
- virtual XMLNode* get_automation_child_xml_node (Evoral::Parameter, int);
+ virtual XMLNode* get_automation_child_xml_node (Evoral::Parameter);
bool mute_press(GdkEventButton*);
bool mute_release(GdkEventButton*);
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index f01aa508ae..94d3bb16ce 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -206,7 +206,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
/* call this on the parent */
- virtual XMLNode* get_automation_child_xml_node (Evoral::Parameter, int) { return 0; }
+ virtual XMLNode* get_automation_child_xml_node (Evoral::Parameter) { return 0; }
virtual LayerDisplay layer_display () const { return Overlaid; }
virtual StreamView* view () const { return 0; }