summaryrefslogtreecommitdiff
path: root/libs/ardour/playlist.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-22 01:22:33 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-22 01:22:33 +0000
commit092e598389668135b9ff1ae493213b17aa2070d7 (patch)
tree8491879a44bb2db8db80cfd6894796c2a894c575 /libs/ardour/playlist.cc
parent8b0e35cba44643cc8e5deb27e6f138b3425d0559 (diff)
When a region movement is undone, prevent the resulting movement from triggering the automation-follows-regions code. Fixes #3348.
git-svn-id: svn://localhost/ardour2/branches/3.0@7464 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r--libs/ardour/playlist.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 5257491815..4c9b8f4bf2 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -446,7 +446,7 @@ Playlist::begin_undo ()
void
Playlist::end_undo ()
{
- thaw ();
+ thaw (true);
in_update = false;
}
@@ -457,11 +457,12 @@ Playlist::freeze ()
g_atomic_int_inc (&ignore_state_changes);
}
+/** @param from_undo true if this thaw is triggered by the end of an undo on this playlist */
void
-Playlist::thaw ()
+Playlist::thaw (bool from_undo)
{
g_atomic_int_dec_and_test (&ignore_state_changes);
- release_notifications ();
+ release_notifications (from_undo);
}
@@ -472,11 +473,12 @@ Playlist::delay_notifications ()
freeze_length = _get_extent().second;
}
+/** @param from_undo true if this release is triggered by the end of an undo on this playlist */
void
-Playlist::release_notifications ()
+Playlist::release_notifications (bool from_undo)
{
if (g_atomic_int_dec_and_test (&block_notifications)) {
- flush_notifications ();
+ flush_notifications (from_undo);
}
}
@@ -535,7 +537,7 @@ Playlist::notify_region_moved (boost::shared_ptr<Region> r)
list< Evoral::RangeMove<framepos_t> > m;
m.push_back (move);
- RangesMoved (m);
+ RangesMoved (m, false);
}
}
@@ -574,8 +576,9 @@ Playlist::notify_length_changed ()
}
}
+/** @param from_undo true if this flush is triggered by the end of an undo on this playlist */
void
-Playlist::flush_notifications ()
+Playlist::flush_notifications (bool from_undo)
{
set<boost::shared_ptr<Region> > dependent_checks_needed;
set<boost::shared_ptr<Region> >::iterator s;
@@ -661,8 +664,7 @@ Playlist::flush_notifications ()
}
if (!pending_range_moves.empty ()) {
- // cerr << _name << " sends RangesMoved\n";
- RangesMoved (pending_range_moves);
+ RangesMoved (pending_range_moves, from_undo);
}
clear_pending ();