diff options
author | Carl Hetherington <carl@carlh.net> | 2010-10-07 18:33:20 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-10-07 18:33:20 +0000 |
commit | dd7258b29fe46722b1d62560c34c57d62154cb36 (patch) | |
tree | a493c8c99789911a87933ada52c94a5194ec6f5c /libs/ardour/location.cc | |
parent | 3b0c5e35411fdb1a22eae54c8c574668b62f9c56 (diff) |
Update auto loop range to match session range until it is changed by the user. Fixes #3472.
git-svn-id: svn://localhost/ardour2/branches/3.0@7883 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/location.cc')
-rw-r--r-- | libs/ardour/location.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 5f6f14ce14..7dce787b60 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -150,13 +150,16 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute) } if (s != _start) { + + framepos_t const old = _start; + _start = s; if (allow_bbt_recompute) { recompute_bbt_from_frames (); } start_changed (this); /* EMIT SIGNAL */ if (is_session_range ()) { - Session::StartTimeChanged (); /* EMIT SIGNAL */ + Session::StartTimeChanged (old); /* EMIT SIGNAL */ AudioFileSource::set_header_position_offset (s); } } @@ -196,6 +199,8 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute) } if (e != _end) { + framepos_t const old = _end; + _end = e; if (allow_bbt_recompute) { recompute_bbt_from_frames (); @@ -203,7 +208,7 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute) end_changed(this); /* EMIT SIGNAL */ if (is_session_range()) { - Session::EndTimeChanged (); /* EMIT SIGNAL */ + Session::EndTimeChanged (old); /* EMIT SIGNAL */ } } @@ -688,6 +693,11 @@ Locations::add (Location *loc, bool make_current) if (make_current) { current_changed (current_location); /* EMIT SIGNAL */ } + + if (loc->is_session_range()) { + Session::StartTimeChanged (0); + Session::EndTimeChanged (1); + } } void |