summaryrefslogtreecommitdiff
path: root/gtk2_ardour/panner_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/panner_ui.cc')
-rw-r--r--gtk2_ardour/panner_ui.cc26
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)
{