diff options
author | Carl Hetherington <carl@carlh.net> | 2011-12-31 13:25:50 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-12-31 13:25:50 +0000 |
commit | 6c0224c9876b1c1c55c6d5f98d82d5d0a870378f (patch) | |
tree | 9385730c0cc33dc424d3a5ed70a7a2dd1bb06adb /libs | |
parent | 9c8a27c66405736078500b23b622c2373c89719f (diff) |
Emit notify_layering_changed() more often; especially when we remove the only region on a top layer, and the StreamView needs to sort itself out.
git-svn-id: svn://localhost/ardour2/branches/3.0@11126 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/playlist.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index c11e55779c..bcc203694e 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -2397,8 +2397,6 @@ Playlist::relayer () return; } - bool changed = false; - /* Build up a new list of regions on each layer, stored in a set of lists each of which represent some period of time on some layer. The idea is to avoid having to search the entire region list to establish whether @@ -2490,16 +2488,16 @@ Playlist::relayer () layers[j][k].push_back (*i); } - if ((*i)->layer() != j) { - changed = true; - } - (*i)->set_layer (j); } - if (changed) { - notify_layering_changed (); - } + /* It's a little tricky to know when we could avoid calling this; e.g. if we are + relayering because we just removed the only region on the top layer, nothing will + appear to have changed, but the StreamView must still sort itself out. We could + probably keep a note of the top layer last time we relayered, and check that, + but premature optimisation &c... + */ + notify_layering_changed (); /* This relayer() may have been called as a result of a region removal, in which case we need to setup layering indices so account for the one that has just |