summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2006-11-03 23:07:55 +0000
committerTaybin Rutkin <taybin@taybin.com>2006-11-03 23:07:55 +0000
commita8deaab02f49cb04090a9c06fe50ab685359f940 (patch)
tree9f0ee600a2000f250fce9eb179a1c305216928ae /libs/ardour/session_state.cc
parent975e44f92480f8ce170637d6b58b48a06e34ca7c (diff)
Fixed template dialog annoyance.
Fixed Location saving in templates. git-svn-id: svn://localhost/ardour2/trunk@1068 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 603d3a5c2d..763f8b9c01 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -880,7 +880,20 @@ Session::state(bool full_state)
}
}
- node->add_child_nocopy (_locations.get_state());
+ if (full_state) {
+ node->add_child_nocopy (_locations.get_state());
+ } else {
+ // for a template, just create a new Locations, populate it
+ // with the default start and end, and get the state for that.
+ Locations loc;
+ Location* start = new Location(0, 0, _("start"), Location::Flags ((Location::IsMark|Location::IsStart)));
+ Location* end = new Location(0, 0, _("end"), Location::Flags ((Location::IsMark|Location::IsEnd)));
+ start->set_end(0);
+ loc.add (start);
+ end->set_end(compute_initial_length());
+ loc.add (end);
+ node->add_child_nocopy (loc.get_state());
+ }
child = node->add_child ("Connections");
{