diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-04 15:55:08 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-04 15:55:08 +0000 |
commit | 93dac756a2ab7ec7b450d9d0ef5004755d3ef23d (patch) | |
tree | 8adf5d39191822fda7a3e3594ab0058a447e75e6 | |
parent | 0e10f8a290588c4a58667cb667bc39d6466e3c1e (diff) |
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
-rw-r--r-- | gtk2_ardour/audio_streamview.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/streamview.cc | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/playlist.h | 1 | ||||
-rw-r--r-- | libs/ardour/playlist.cc | 17 | ||||
-rw-r--r-- | libs/pbd/debug.cc | 8 |
5 files changed, 17 insertions, 12 deletions
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index ac95bf63c2..a432f91874 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -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();) { diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 3aff2f2d18..d405489319 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -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; } diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index bc896f35a4..b6e8719ccd 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -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; diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 2b9ce7824f..0549982217 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -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 diff --git a/libs/pbd/debug.cc b/libs/pbd/debug.cc index f8abdcb488..318f85a099 100644 --- a/libs/pbd/debug.cc +++ b/libs/pbd/debug.cc @@ -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; } } |