summaryrefslogtreecommitdiff
path: root/libs/ardour/region.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-08-26 00:06:21 +0000
committerCarl Hetherington <carl@carlh.net>2009-08-26 00:06:21 +0000
commit28af0265b5867a4ad9bd35e2d98eadd7f1264693 (patch)
tree11d63ba1b446de353c4b28f6e822d0549b2f5499 /libs/ardour/region.cc
parent33328b868dd29bfe80c8b4acc664358f8530bcd5 (diff)
When a track is in "stacked" mode, allow regions to be moved to different layers by dragging
and dropping. In stacked mode, the relayering by "recently added / moved etc. is higher" setting is ignored, and regions are put on the layer that they are dropped to, unless: 1. they are dropped so that they overlap another region on the same layer, in which case they are put on the layer above that one. 2. they are dropped such that they could be put on a lower layer with no audible difference, in which case they are put on the lower layer. git-svn-id: svn://localhost/ardour2/branches/3.0@5590 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r--libs/ardour/region.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 1f90a0761b..0e0df08284 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -78,6 +78,7 @@ Region::Region (Session& s, nframes_t start, nframes_t length, const string& nam
, _read_data_count(0)
, _pending_changed(Change (0))
, _last_layer_op(0)
+ , _pending_explicit_relayer (false)
{
/* no sources at this point */
}
@@ -104,7 +105,7 @@ Region::Region (boost::shared_ptr<Source> src, nframes_t start, nframes_t length
, _read_data_count(0)
, _pending_changed(Change (0))
, _last_layer_op(0)
-
+ , _pending_explicit_relayer (false)
{
_sources.push_back (src);
_master_sources.push_back (src);
@@ -136,6 +137,7 @@ Region::Region (const SourceList& srcs, nframes_t start, nframes_t length, const
, _read_data_count(0)
, _pending_changed(Change (0))
, _last_layer_op(0)
+ , _pending_explicit_relayer (false)
{
use_sources (srcs);
assert(_sources.size() > 0);
@@ -145,6 +147,7 @@ Region::Region (const SourceList& srcs, nframes_t start, nframes_t length, const
Region::Region (boost::shared_ptr<const Region> other, nframes_t offset, nframes_t length, const string& name, layer_t layer, Flag flags)
: SessionObject(other->session(), name)
, _type (other->data_type())
+ , _pending_explicit_relayer (false)
{
_start = other->_start + offset;
@@ -184,6 +187,7 @@ Region::Region (boost::shared_ptr<const Region> other, nframes_t offset, nframes
Region::Region (boost::shared_ptr<const Region> other, nframes_t length, const string& name, layer_t layer, Flag flags)
: SessionObject(other->session(), name)
, _type (other->data_type())
+ , _pending_explicit_relayer (false)
{
/* create a new Region exactly like another but starting at 0 in its sources */
@@ -256,6 +260,7 @@ Region::Region (boost::shared_ptr<const Region> other)
, _read_data_count(0)
, _pending_changed(Change(0))
, _last_layer_op(other->_last_layer_op)
+ , _pending_explicit_relayer (false)
{
_flags = Flag (_flags | DoNotSendPropertyChanges);
@@ -289,6 +294,7 @@ Region::Region (const SourceList& srcs, const XMLNode& node)
, _read_data_count(0)
, _pending_changed(Change(0))
, _last_layer_op(0)
+ , _pending_explicit_relayer (false)
{
use_sources (srcs);
@@ -318,6 +324,7 @@ Region::Region (boost::shared_ptr<Source> src, const XMLNode& node)
, _read_data_count(0)
, _pending_changed(Change(0))
, _last_layer_op(0)
+ , _pending_explicit_relayer (false)
{
_sources.push_back (src);