Prevent region drags with the middle button in internal edit mode (#3869).
[ardour.git] / gtk2_ardour / panner_ui.cc
index 2a69d73251b8d49f797284078075f2a9c2a9fa06..c783283d998ccca4b3a04bcea9814fda465756a4 100644 (file)
@@ -272,16 +272,17 @@ PannerUI::setup_pan ()
 
                         ac = pannable->pan_azimuth_control;
                         _stereo_panner->StartPositionGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch), 
-                                                              boost::weak_ptr<AutomationControl> (ac)));
+                                                                                  boost::weak_ptr<AutomationControl> (ac)));
                         _stereo_panner->StopPositionGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch), 
-                                                             boost::weak_ptr<AutomationControl>(ac)));
-
+                                                                                 boost::weak_ptr<AutomationControl>(ac)));
+                        
                         ac = pannable->pan_width_control;
                         _stereo_panner->StartWidthGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch), 
-                                                              boost::weak_ptr<AutomationControl> (ac)));
+                                                                               boost::weak_ptr<AutomationControl> (ac)));
                         _stereo_panner->StopWidthGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch), 
-                                                             boost::weak_ptr<AutomationControl>(ac)));
-
+                                                                              boost::weak_ptr<AutomationControl>(ac)));
+                        _stereo_panner->signal_button_release_event().connect (sigc::mem_fun(*this, &PannerUI::pan_button_event));
+                        
                 } else if (nins == 1) {
                         /* 1-in/2out */
                         
@@ -435,9 +436,8 @@ PannerUI::update_pan_sensitive ()
 {
        bool const sensitive = !(_panner->pannable()->automation_state() & Play);
 
-#ifdef PANNER_HACKS
         pan_vbox.set_sensitive (sensitive);
-#endif
+
         if (big_window) {
                 big_window->set_sensitive (sensitive);
         }