summaryrefslogtreecommitdiff
path: root/gtk2_ardour/selection.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-08-06 22:16:36 +0200
committerRobin Gareus <robin@gareus.org>2017-08-06 22:17:58 +0200
commit7009ff030070c1ce9da23c00d8153e763f65901a (patch)
tree8c0a2015af098e35e9abd3c54a7ff05015965b7a /gtk2_ardour/selection.cc
parent1cbbbf6aad302e5aa91c470984fb8a7dd3ad39f1 (diff)
Update Selection API to include all Stripables
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r--gtk2_ardour/selection.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 1e89e08879..a75574bb19 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -1138,11 +1138,11 @@ Selection::get_state () const
XMLNode* node = new XMLNode (X_("Selection"));
for (TrackSelection::const_iterator i = tracks.begin(); i != tracks.end(); ++i) {
- RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
+ StripableTimeAxisView* stv = dynamic_cast<StripableTimeAxisView*> (*i);
AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (*i);
- if (rtv) {
- XMLNode* t = node->add_child (X_("RouteView"));
- t->set_property (X_("id"), rtv->route()->id ());
+ if (stv) {
+ XMLNode* t = node->add_child (X_("StripableView"));
+ t->set_property (X_("id"), stv->stripable()->id ());
} else if (atv) {
XMLNode* t = node->add_child (X_("AutomationView"));
t->set_property (X_("id"), atv->parent_stripable()->id ());
@@ -1317,11 +1317,11 @@ Selection::set_state (XMLNode const & node, int)
assert(false);
}
- RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (route_id); // XXX may also be VCA
+ StripableTimeAxisView* stv = editor->get_stripable_time_axis_by_id (route_id);
vector <ControlPoint *> cps;
- if (rtv) {
- boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().from_symbol (param));
+ if (stv) {
+ boost::shared_ptr<AutomationTimeAxisView> atv = stv->automation_child (EventTypeMap::instance().from_symbol (param));
if (atv) {
list<boost::shared_ptr<AutomationLine> > lines = atv->lines();
for (list<boost::shared_ptr<AutomationLine> > ::iterator li = lines.begin(); li != lines.end(); ++li) {
@@ -1387,10 +1387,10 @@ Selection::set_state (XMLNode const & node, int)
assert (false);
}
- RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
+ StripableTimeAxisView* stv = editor->get_stripable_time_axis_by_id (id);
- if (rtv) {
- boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().from_symbol (param));
+ if (stv) {
+ boost::shared_ptr<AutomationTimeAxisView> atv = stv->automation_child (EventTypeMap::instance().from_symbol (param));
/* the automation could be for an entity that was never saved
in the session file. Don't freak out if we can't find