From 6ae1f44c17d873fe3ea7008247ed3059c632b703 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Fri, 18 Nov 2022 15:18:04 +0100 Subject: [PATCH] AudioClock: drop unused _edit_by_click_field --- gtk2_ardour/audio_clock.cc | 32 +------------------------------- gtk2_ardour/audio_clock.h | 1 - 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index f9d82d13f2..b24b8502bb 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -83,7 +83,6 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string& , _follows_playhead (follows_playhead) , _accept_on_focus_out (accept_on_focus_out) , _off (false) - , _edit_by_click_field (false) , _negative_allowed (false) , edit_is_negative (false) , _limit_pos (timepos_t::max (Temporal::AudioTime)) @@ -1727,36 +1726,7 @@ AudioClock::on_button_release_event (GdkEventButton *ev) return true; } else { if (ev->button == 1) { - - if (_edit_by_click_field) { - - int xcenter = (get_width() - layout_width) /2; - int index = 0; - int trailing; - int y = ev->y - ((get_height() - layout_height)/2); - int x = ev->x - xcenter; - Field f; - - if (!_layout->xy_to_index (x * PANGO_SCALE, y * PANGO_SCALE, index, trailing)) { - return true; - } - - f = index_to_field (index); - - switch (f) { - case Timecode_frames: - case MS_Milliseconds: - case Ticks: - case SS_Deciseconds: - f = Field (0); - break; - default: - break; - } - start_edit (f); - } else { - start_edit (); - } + start_edit (); } } } diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h index 99c2e603ca..5c61b3ae05 100644 --- a/gtk2_ardour/audio_clock.h +++ b/gtk2_ardour/audio_clock.h @@ -132,7 +132,6 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr bool _follows_playhead; bool _accept_on_focus_out; bool _off; - bool _edit_by_click_field; bool _negative_allowed; bool edit_is_negative;