PBD::PropertyDescriptor<bool> right_of_split;
PBD::PropertyDescriptor<bool> hidden;
PBD::PropertyDescriptor<bool> position_locked;
+ PBD::PropertyDescriptor<bool> valid_transients;
PBD::PropertyDescriptor<framepos_t> start;
PBD::PropertyDescriptor<framecnt_t> length;
PBD::PropertyDescriptor<framepos_t> position;
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for hidden = %1\n", Properties::hidden.property_id));
Properties::position_locked.property_id = g_quark_from_static_string (X_("position-locked"));
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for position-locked = %1\n", Properties::position_locked.property_id));
+ Properties::valid_transients.property_id = g_quark_from_static_string (X_("valid-transients"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for valid-transients = %1\n", Properties::valid_transients.property_id));
Properties::start.property_id = g_quark_from_static_string (X_("start"));
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for start = %1\n", Properties::start.property_id));
Properties::length.property_id = g_quark_from_static_string (X_("length"));
add_property (_right_of_split);
add_property (_hidden);
add_property (_position_locked);
+ add_property (_valid_transients);
add_property (_start);
add_property (_length);
add_property (_position);
, _right_of_split (Properties::right_of_split, false) \
, _hidden (Properties::hidden, false) \
, _position_locked (Properties::position_locked, false) \
+ , _valid_transients (Properties::valid_transients, false) \
, _start (Properties::start, (s)) \
, _length (Properties::length, (l)) \
, _position (Properties::position, 0) \
, _right_of_split (other->_right_of_split) \
, _hidden (other->_hidden) \
, _position_locked (other->_position_locked) \
+ , _valid_transients (other->_valid_transients) \
, _start(other->_start) \
, _length(other->_length) \
, _position(other->_position) \
, _last_length (0)
, _last_position (0)
, _first_edit (EditChangesNothing)
- , _valid_transients(false)
, _read_data_count(0)
, _last_layer_op (0)
, _pending_explicit_relayer (false)
/** Create a new Region from part of an existing one, starting at one of two places:
- if @param offset_relative is true, then the start within @param other is given by @param offset
- (i.e. relative to the start of @param other's sources, the start is @param offset + @param other.start()
+ if \a offset_relative is true, then the start within \a other is given by \a offset
+ (i.e. relative to the start of \a other's sources, the start is \a offset + \a other.start()
- if @param offset_relative is false, then the start within the source is given @param offset.
+ if @param offset_relative is false, then the start within the source is given \a offset.
*/
Region::Region (boost::shared_ptr<const Region> other, frameoffset_t offset, bool offset_relative)
: SessionObject(other->session(), other->name())
, _last_length (other->_last_length)
, _last_position(other->_last_position) \
, _first_edit (EditChangesNothing)
- , _valid_transients(false)
, _read_data_count(0)
, _last_layer_op (0)
, _pending_explicit_relayer (false)
, _last_length (other->_last_length)
, _last_position (other->_last_position)
, _first_edit (EditChangesID)
- , _valid_transients (false)
, _read_data_count (0)
, _last_layer_op (other->_last_layer_op)
, _pending_explicit_relayer (false)
, _last_length (other->_last_length)
, _last_position (other->_last_position)
, _first_edit (EditChangesID)
- , _valid_transients(false)
, _read_data_count(0)
, _last_layer_op(other->_last_layer_op)
, _pending_explicit_relayer (false)
recompute_position_from_lock_style ();
}
- invalidate_transients ();
+ //invalidate_transients ();
}
/* do this even if the position is the same. this helps out
a GUI that has moved its representation already.
*/
-
send_change (Properties::position);
}
if (new_position < end) { /* can't trim it zero or negative length */
- nframes_t newlen;
+ nframes_t newlen = 0;
+ nframes64_t delta = 0;
/* can't trim it back passed where source position zero is located */
if (new_position > _position) {
newlen = _length - (new_position - _position);
+ delta = -1 * (new_position - _position);
} else {
newlen = _length + (_position - new_position);
+ delta = _position - new_position;
}
trim_to_internal (new_position, newlen, src);
+
if (reset_fade) {
_right_of_split = true;
}
if (!property_changes_suspended()) {
recompute_at_start ();
}
+
+ if (_transients.size() > 0){
+ adjust_transients(delta);
+ }
}
}
new_start = _start + start_shift;
}
-
} else if (start_shift < 0) {
if (_start < -start_shift) {
} else {
new_start = _start + start_shift;
}
+
} else {
new_start = _start;
}
}
XMLNode&
-Region::state (bool full)
+Region::state ()
{
XMLNode *node = new XMLNode ("Region");
char buf[64];
node->add_property (buf2, buf);
}
- if (full && _extra_xml) {
+ if (_extra_xml) {
node->add_child_copy (*_extra_xml);
}
XMLNode&
Region::get_state ()
{
- return state (true);
+ return state ();
}
int
{
const XMLProperty* prop;
- what_changed = set_properties (node);
+ what_changed = set_values (node);
if ((prop = node.property (X_("id")))) {
_id = prop->value();
Region::set_master_sources (const SourceList& srcs)
{
for (SourceList::const_iterator i = _master_sources.begin (); i != _master_sources.end(); ++i) {
- cerr << name() << " " << id() << " DEC M SMS\n";
(*i)->dec_use_count ();
}
{
if (!other)
return false;
+
+ if ((_sources.size() != other->_sources.size()) ||
+ (_master_sources.size() != other->_master_sources.size())) {
+ return false;
+ }
SourceList::const_iterator i;
SourceList::const_iterator io;
{
_valid_transients = false;
_transients.clear ();
+
+ send_change (PropertyChange (Properties::valid_transients));
}
void
}
}
}
-
-PropertyList*
-Region::property_factory (const XMLNode& history_node) const
-{
- PropertyList* prop_list = new PropertyList;
-
- for (OwnedPropertyList::const_iterator i = _properties->begin(); i != _properties->end(); ++i) {
- PropertyBase* prop = i->second->maybe_clone_self_if_found_in_history_node (history_node);
-
- if (prop) {
- prop_list->add (prop);
- }
- }
-
- return prop_list;
-}