Set up region BBT time when frame position changes, if the region is glued to BBT; fixes part of #4257.

git-svn-id: svn://localhost/ardour2/branches/3.0@10986 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-12-12 02:50:47 +00:00
parent 4dd7b9b34c
commit a107b95307
4 changed files with 12 additions and 0 deletions

View file

@ -396,6 +396,7 @@ class Region
virtual int _set_state (const XMLNode&, int version, PBD::PropertyChange& what_changed, bool send_signal);
void register_properties ();
void post_set (const PBD::PropertyChange&);
protected:
void use_sources (SourceList const &);

View file

@ -153,6 +153,8 @@ MidiRegion::clone () const
void
MidiRegion::post_set (const PropertyChange& pc)
{
Region::post_set (pc);
if (pc.contains (Properties::length) && !pc.contains (Properties::length_beats)) {
update_length_beats ();
} else if (pc.contains (Properties::start) && !pc.contains (Properties::start_beats)) {

View file

@ -1354,6 +1354,7 @@ Playlist::flush_notifications (bool from_undo)
(*r)->set_position ((*r)->position() + distance);
}
/* XXX: may not be necessary; Region::post_set should do this, I think */
for (RegionList::iterator r = fixup.begin(); r != fixup.end(); ++r) {
(*r)->recompute_position_from_lock_style ();
}

View file

@ -1685,3 +1685,11 @@ Region::is_compound () const
{
return max_source_level() > 0;
}
void
Region::post_set (const PropertyChange& pc)
{
if (pc.contains (Properties::position)) {
recompute_position_from_lock_style ();
}
}