summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_strip.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-03-02 12:13:45 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:39 -0400
commit8ce39c891bece4845075cfb03c45c80e5177c17a (patch)
treeeab98c4dbcc65bc571c29cacf356fbe093d1e247 /gtk2_ardour/mixer_strip.cc
parent75b327964bafcccf15e83800132053524aebdf89 (diff)
change sort ordering model in mixer and editor
This allows correct reordering of the mixer "track_model" even when non-route elements are present. This isn't really utilized in the Editor at present because we do not show VCAs there at all, but it will become important in the future when we represent VCA automation there
Diffstat (limited to 'gtk2_ardour/mixer_strip.cc')
-rw-r--r--gtk2_ardour/mixer_strip.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 3598f19e9b..c8faaa41f9 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -2494,6 +2494,14 @@ MixerStrip::vca_menu_toggle (CheckMenuItem* menuitem, uint32_t n)
return;
}
+ if (!_selected) {
+ /* if this strip is not selected, add it before carrying out
+ changes to assignment. the user probably didn't notice
+ that they were clicking on an unselected track.
+ */
+ _mixer.select_strip (*this);
+ }
+
if (!menuitem->get_active()) {
cerr << "Unassign from " << n << endl;
_mixer.do_vca_unassign (vca);
@@ -2509,8 +2517,8 @@ MixerStrip::vca_assign (boost::shared_ptr<VCA> vca)
if (!vca || !_route) {
return;
}
-
- vca->add (_route);
+ cerr << "Adding " << _route->name() << " to " << vca->number() << endl;
+ _route->gain_control()->add_master (vca);
}
void
@@ -2522,9 +2530,11 @@ MixerStrip::vca_unassign (boost::shared_ptr<VCA> vca)
if (!vca) {
/* null VCA means drop all VCA assignments */
+ cerr << "clear vcas for " << _route->name() << endl;
_route->gain_control()->clear_masters ();
} else {
- vca->remove (_route);
+ cerr << "Removing " << _route->name() << " from " << vca->number() << endl;
+ _route->gain_control()->remove_master (vca);
}
}