Make left-click on tempo/meter in main clock edit current tempo/meter
[ardour.git] / gtk2_ardour / main_clock.cc
index bbb3d5af4e0ed18f3924505cd301f1341c8e32e7..f90599de1374e6675a636e0188305e2ccefc4850 100644 (file)
@@ -116,3 +116,24 @@ MainClock::insert_new_meter ()
        PublicEditor::instance().mouse_add_new_meter_event (absolute_time ());
 }
 
+bool
+MainClock::on_button_press_event (GdkEventButton *ev)
+{
+       if (ev->button == 1) {
+               if (mode() == BBT) {
+                       if (is_lower_layout_click(ev->y)) {
+                               if (is_right_layout_click(ev->x)) {
+                                       // meter on the right
+                                       edit_current_meter();
+                               } else {
+                                       // tempo on the left
+                                       edit_current_tempo();
+                               }
+                               return true;
+                       }
+               }
+       }
+
+       return AudioClock::on_button_press_event (ev);
+}
+