diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-19 21:09:40 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-19 21:09:40 +0000 |
commit | 7b6b75f38ff6b34de3f70e36045498f227c1727d (patch) | |
tree | d7bc76a8745daa5051b2bcce7f84910f3ad72aac /gtk2_ardour/panner_ui.cc | |
parent | b6642d14ca64153b5731d1a3a79e4d00060541ca (diff) |
forward port automation handling changes from 2.x, upto and including about rev 6981 (will need full testing in the 3.X context). as on 2.x, this removes real-time visual updates to automation curves during write/touch automation recording
git-svn-id: svn://localhost/ardour2/branches/3.0@7653 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/panner_ui.cc')
-rw-r--r-- | gtk2_ardour/panner_ui.cc | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 69387ad3a2..263a8ec518 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -405,8 +405,10 @@ PannerUI::setup_pan () boost::shared_ptr<AutomationControl> ac = _panner->pan_control (asz); if (asz) { - bc->StartGesture.connect (sigc::mem_fun (*ac, &AutomationControl::start_touch)); - bc->StopGesture.connect (sigc::mem_fun (*ac, &AutomationControl::stop_touch)); + bc->StartGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch), + boost::weak_ptr<AutomationControl> (ac))); + bc->StopGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch), + boost::weak_ptr<AutomationControl>(ac))); } char buf[64]; @@ -459,6 +461,26 @@ PannerUI::setup_pan () } } +void +PannerUI::start_touch (boost::weak_ptr<AutomationControl> wac) +{ + boost::shared_ptr<AutomationControl> ac = wac.lock(); + if (!ac) { + return; + } + ac->start_touch (ac->session().transport_frame()); +} + +void +PannerUI::stop_touch (boost::weak_ptr<AutomationControl> wac) +{ + boost::shared_ptr<AutomationControl> ac = wac.lock(); + if (!ac) { + return; + } + ac->stop_touch (false, ac->session().transport_frame()); +} + bool PannerUI::pan_button_event (GdkEventButton* ev, uint32_t which) { |