summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-20 21:51:59 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-20 21:52:24 -0400
commit5d6dc388f71dbb4910832ed766af92592b000e52 (patch)
tree195bf151357f35378a00197390e92383927b3343 /gtk2_ardour/mixer_ui.cc
parent237741d18722252abd4a6a20d3422315481ccffe (diff)
fix some confusion when redrawing editor/mixer track/strip displays after track/bus deletion
The code relied on the idea that the order-key resync that occurs after deletion would change the order keys and thus cause a redisplay. But since both the editor and mixer can initiate an order-key resync, the other window's resync will actually do nothing (the order keys will already be correct). This led to the incorrect placement of material in the tracks canvas, because the first resync triggered a redisplay while the route still existed, and then the second resync didn't cause a redisplay (repositioning) but the canvas elements representing the track went away. Fixed by forcing a redisplay in both editor and mixer if a route deletion is believed to be triggering a row deletion in their underlying data models.
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r--gtk2_ardour/mixer_ui.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index 874f8feddf..dc0ca4b198 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -92,6 +92,9 @@ Mixer_UI::Mixer_UI ()
, _strip_width (Config->get_default_narrow_ms() ? Narrow : Wide)
, ignore_reorder (false)
, _following_editor_selection (false)
+ , _in_group_rebuild_or_clear (false)
+ , _route_deletion_in_progress (false)
+ , _maximised (false)
{
/* allow this window to become the key focus window */
set_flags (CAN_FOCUS);
@@ -239,9 +242,6 @@ Mixer_UI::Mixer_UI ()
list_hpane.show();
group_display.show();
- _in_group_rebuild_or_clear = false;
- _maximised = false;
-
MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
MonitorSection::setup_knob_images ();
@@ -420,6 +420,7 @@ Mixer_UI::remove_strip (MixerStrip* strip)
for (ri = rows.begin(); ri != rows.end(); ++ri) {
if ((*ri)[track_columns.strip] == strip) {
+ PBD::Unwinder<bool> uw (_route_deletion_in_progress, true);
track_model->erase (ri);
break;
}
@@ -997,9 +998,17 @@ Mixer_UI::track_list_delete (const Gtk::TreeModel::Path&)
{
/* this happens as the second step of a DnD within the treeview as well
as when a row/route is actually deleted.
+
+ if it was a deletion then we have to force a redisplay because
+ order keys may not have changed.
*/
+
DEBUG_TRACE (DEBUG::OrderKeys, "mixer UI treeview row deleted\n");
sync_order_keys_from_treeview ();
+
+ if (_route_deletion_in_progress) {
+ redisplay_track_list ();
+ }
}
void