On switching from explicit to implicit relayering, attempt to ensure that any layering set up
whilst in explicit mode will be preserved on subsequent implicit relayer operations. git-svn-id: svn://localhost/ardour2/branches/3.0@5591 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
28af0265b5
commit
b1e69d4b7b
@ -162,9 +162,8 @@ class Playlist : public SessionObject,
|
||||
bool explicit_relayering () const {
|
||||
return _explicit_relayering;
|
||||
}
|
||||
void set_explicit_relayering (bool e) {
|
||||
_explicit_relayering = e;
|
||||
}
|
||||
|
||||
void set_explicit_relayering (bool e);
|
||||
|
||||
protected:
|
||||
friend class Session;
|
||||
|
@ -2465,4 +2465,24 @@ Playlist::foreach_region (sigc::slot<void, boost::shared_ptr<Region> > s)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::set_explicit_relayering (bool e)
|
||||
{
|
||||
if (e == false && _explicit_relayering == true) {
|
||||
|
||||
/* We are changing from explicit to implicit relayering; layering may have been changed whilst
|
||||
we were in explicit mode, and we don't want that to be undone next time an implicit relayer
|
||||
occurs. Hence now we'll set up region last_layer_op values so that an implicit relayer
|
||||
at this point would keep regions on the same layers.
|
||||
|
||||
From then on in, it's just you and your towel.
|
||||
*/
|
||||
|
||||
RegionLock rl (this);
|
||||
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
||||
(*i)->set_last_layer_op ((*i)->layer ());
|
||||
}
|
||||
}
|
||||
|
||||
_explicit_relayering = e;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user