return;
}
- cerr << "a region went way, it appears to be ours (" << this << ")\n";
-
if (!_trackview.session()->deletion_in_progress()) {
for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
if (((*i)->region()) == r) {
RegionView* rv = *i;
region_views.erase (i);
- cerr << "Deleting RV for " << r->name() << " @ " << r << endl;
delete rv;
break;
}
bool save_on_thaw;
std::string last_save_reason;
uint32_t in_set_state;
+ bool in_update;
bool first_set_state;
bool _hidden;
bool _splicing;
#include "pbd/failed_constructor.h"
#include "pbd/stateful_diff_command.h"
-#include "pbd/stl_delete.h"
#include "pbd/xml++.h"
#include "ardour/debug.h"
_shuffling = false;
_nudging = false;
in_set_state = 0;
+ in_update = false;
_edit_mode = Config->get_edit_mode();
in_flush = false;
in_partition = false;
void
Playlist::begin_undo ()
{
+ in_update = true;
freeze ();
}
Playlist::end_undo ()
{
thaw ();
+ in_update = false;
}
void
possibly_splice_unlocked (position, region->length(), region);
- if (!holding_state () && !in_set_state) {
- /* layers get assigned from XML state */
+ if (!holding_state ()) {
+ /* layers get assigned from XML state, and are not reset during undo/redo */
relayer ();
}
possibly_splice_unlocked (pos, -distance);
if (!holding_state ()) {
- relayer ();
+ relayer ();
remove_dependents (region);
if (old_length != _get_maximum_extent()) {
for (RegionListProperty::ChangeContainer::iterator i = change.removed.begin(); i != change.removed.end(); ++i) {
remove_region (*i);
}
+
thaw ();
}
void
Playlist::relayer ()
{
+ /* never compute layers when changing state for undo/redo or setting from XML*/
+
+ if (in_update || in_set_state) {
+ return;
+ }
+
bool changed = false;
/* Build up a new list of regions on each layer, stored in a set of lists
{
uint64_t ret;
_debug_bit_map.insert (make_pair (name, _debug_bit));
- cerr << "debug name " << name << " = " << _debug_bit << endl;
ret = _debug_bit;
_debug_bit <<= 1;
return ret;
for (map<const char*,uint64_t>::iterator i = _debug_bit_map.begin(); i != _debug_bit_map.end(); ++i) {
if (strncasecmp (p, i->first, strlen (p)) == 0) {
- cerr << "debug args matched for " << p << " set bit " << i->second << endl;
bits |= i->second;
}
}
void
PBD::list_debug_options ()
{
- cerr << _("The following debug options are available. Separate multipe options with commas.\nNames are case-insensitive and can be abbreviated.") << endl << endl;
- cerr << "\tAll" << endl;
+ cout << _("The following debug options are available. Separate multipe options with commas.\nNames are case-insensitive and can be abbreviated.") << endl << endl;
+ cout << "\tAll" << endl;
for (map<const char*,uint64_t>::iterator i = _debug_bit_map.begin(); i != _debug_bit_map.end(); ++i) {
- cerr << "\t" << i->first << endl;
+ cout << "\t" << i->first << endl;
}
}