diff options
author | Nikolaus Gullotta <nik@harrisonconsoles.com> | 2019-07-22 15:47:01 -0500 |
---|---|---|
committer | Nikolaus Gullotta <nik@harrisonconsoles.com> | 2019-07-22 15:47:01 -0500 |
commit | 7d4f72174c2c5b97baf5fe5ec22f41ad28818925 (patch) | |
tree | bf944e4e8d27674d312b6169b7bd27a2614187d3 /libs/ardour/location.cc | |
parent | b5a50821fcf934f198483d5061ba8fcb791efcc9 (diff) |
Location timestamp changes - can now sort by location creation date: lib ardour part
Diffstat (limited to 'libs/ardour/location.cc')
-rw-r--r-- | libs/ardour/location.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 24774c5fec..1b4b5a87c1 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -65,6 +65,7 @@ Location::Location (Session& s) , _flags (Flags (0)) , _locked (false) , _position_lock_style (AudioTime) + , _timestamp(time(0)) { assert (_start >= 0); assert (_end >= 0); @@ -79,7 +80,7 @@ Location::Location (Session& s, samplepos_t sample_start, samplepos_t sample_end , _flags (bits) , _locked (false) , _position_lock_style (s.config.get_glue_new_markers_to_bars_and_beats() ? MusicTime : AudioTime) - + , _timestamp(time(0)) { recompute_beat_from_samples (sub_num); @@ -97,7 +98,7 @@ Location::Location (const Location& other) , _end_beat (other._end_beat) , _flags (other._flags) , _position_lock_style (other._position_lock_style) - + , _timestamp(time(0)) { /* copy is not locked even if original was */ @@ -113,6 +114,7 @@ Location::Location (Session& s, const XMLNode& node) : SessionHandleRef (s) , _flags (Flags (0)) , _position_lock_style (AudioTime) + , _timestamp(time(0)) { /* Note: _position_lock_style is initialised above in case set_state doesn't set it (for 2.X session file compatibility). @@ -599,7 +601,7 @@ Location::get_state () node->set_property ("flags", _flags); node->set_property ("locked", _locked); node->set_property ("position-lock-style", _position_lock_style); - + node->set_property ("timestamp", _timestamp); if (_scene_change) { node->add_child_nocopy (_scene_change->get_state()); } @@ -648,6 +650,8 @@ Location::set_state (const XMLNode& node, int version) return -1; } + node.get_property ("timestamp", _timestamp); + Flags old_flags (_flags); if (!node.get_property ("flags", _flags)) { |