diff options
author | Carl Hetherington <carl@carlh.net> | 2011-01-05 02:06:15 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-01-05 02:06:15 +0000 |
commit | 92b787ffbad9bf1cfd210134df5f265d3b4532e1 (patch) | |
tree | 81a071390c3a2b8d8c9bff31a410babf2dec4f65 /gtk2_ardour | |
parent | 4a9f3173ee806f5e3955c30c1bacb60cdbcc1f96 (diff) |
Toggle the shown state of send gain on double click.
git-svn-id: svn://localhost/ardour2/branches/3.0@8441 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 10 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.cc | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index b547e54852..651c9eace9 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -98,6 +98,14 @@ class MixerStrip : public RouteUI, public Gtk::EventBox void set_route (boost::shared_ptr<ARDOUR::Route>); void set_button_names (); void show_send (boost::shared_ptr<ARDOUR::Send>); + void revert_to_default_display (); + + /** @return the delivery that is being edited using our fader; it will be the + * last send passed to ::show_send, or our route's main out delivery. + */ + boost::shared_ptr<ARDOUR::Delivery> current_delivery () const { + return _current_delivery; + } bool mixer_owned () const { return _mixer_owned; @@ -272,8 +280,6 @@ class MixerStrip : public RouteUI, public Gtk::EventBox void set_current_delivery (boost::shared_ptr<ARDOUR::Delivery>); boost::shared_ptr<ARDOUR::Delivery> _current_delivery; - void revert_to_default_display (); - void drop_send (); PBD::ScopedConnection send_gone_connection; diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 7795035ce0..93a1d14bed 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -1608,7 +1608,11 @@ ProcessorBox::toggle_edit_processor (boost::shared_ptr<Processor> processor) } if (_parent_strip) { - _parent_strip->show_send (send); + if (boost::dynamic_pointer_cast<Send> (_parent_strip->current_delivery()) == send) { + _parent_strip->revert_to_default_display (); + } else { + _parent_strip->show_send (send); + } } } else if ((retrn = boost::dynamic_pointer_cast<Return> (processor)) != 0) { |