prevent relaying during an undo/redo operation; remove some debug output
git-svn-id: svn://localhost/ardour2/branches/3.0@6728 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0e10f8a290
commit
93dac756a2
@ -210,8 +210,6 @@ AudioStreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
|
||||
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();) {
|
||||
|
@ -198,7 +198,6 @@ StreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
|
||||
if (((*i)->region()) == r) {
|
||||
RegionView* rv = *i;
|
||||
region_views.erase (i);
|
||||
cerr << "Deleting RV for " << r->name() << " @ " << r << endl;
|
||||
delete rv;
|
||||
break;
|
||||
}
|
||||
|
@ -253,6 +253,7 @@ class Playlist : public SessionObject
|
||||
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;
|
||||
|
@ -27,7 +27,6 @@
|
||||
|
||||
#include "pbd/failed_constructor.h"
|
||||
#include "pbd/stateful_diff_command.h"
|
||||
#include "pbd/stl_delete.h"
|
||||
#include "pbd/xml++.h"
|
||||
|
||||
#include "ardour/debug.h"
|
||||
@ -331,6 +330,7 @@ Playlist::init (bool hide)
|
||||
_shuffling = false;
|
||||
_nudging = false;
|
||||
in_set_state = 0;
|
||||
in_update = false;
|
||||
_edit_mode = Config->get_edit_mode();
|
||||
in_flush = false;
|
||||
in_partition = false;
|
||||
@ -389,6 +389,7 @@ Playlist::set_name (const string& str)
|
||||
void
|
||||
Playlist::begin_undo ()
|
||||
{
|
||||
in_update = true;
|
||||
freeze ();
|
||||
}
|
||||
|
||||
@ -396,6 +397,7 @@ void
|
||||
Playlist::end_undo ()
|
||||
{
|
||||
thaw ();
|
||||
in_update = false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -719,8 +721,8 @@ Playlist::add_region_internal (boost::shared_ptr<Region> region, framepos_t posi
|
||||
|
||||
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 ();
|
||||
}
|
||||
|
||||
@ -794,7 +796,7 @@ Playlist::remove_region_internal (boost::shared_ptr<Region> region)
|
||||
possibly_splice_unlocked (pos, -distance);
|
||||
|
||||
if (!holding_state ()) {
|
||||
relayer ();
|
||||
relayer ();
|
||||
remove_dependents (region);
|
||||
|
||||
if (old_length != _get_maximum_extent()) {
|
||||
@ -2063,6 +2065,7 @@ Playlist::update (const RegionListProperty::ChangeRecord& change)
|
||||
for (RegionListProperty::ChangeContainer::iterator i = change.removed.begin(); i != change.removed.end(); ++i) {
|
||||
remove_region (*i);
|
||||
}
|
||||
|
||||
thaw ();
|
||||
}
|
||||
|
||||
@ -2306,6 +2309,12 @@ Playlist::set_edit_mode (EditMode mode)
|
||||
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
|
||||
|
@ -40,7 +40,6 @@ PBD::new_debug_bit (const char* name)
|
||||
{
|
||||
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;
|
||||
@ -83,7 +82,6 @@ PBD::parse_debug_options (const char* str)
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -99,10 +97,10 @@ PBD::parse_debug_options (const char* str)
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user