13
0

AudioClock: drop unused _edit_by_click_field

This commit is contained in:
Mads Kiilerich 2022-11-18 15:18:04 +01:00
parent e16dd3866c
commit 6ae1f44c17
2 changed files with 1 additions and 32 deletions

View File

@ -83,7 +83,6 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string&
, _follows_playhead (follows_playhead) , _follows_playhead (follows_playhead)
, _accept_on_focus_out (accept_on_focus_out) , _accept_on_focus_out (accept_on_focus_out)
, _off (false) , _off (false)
, _edit_by_click_field (false)
, _negative_allowed (false) , _negative_allowed (false)
, edit_is_negative (false) , edit_is_negative (false)
, _limit_pos (timepos_t::max (Temporal::AudioTime)) , _limit_pos (timepos_t::max (Temporal::AudioTime))
@ -1727,40 +1726,11 @@ AudioClock::on_button_release_event (GdkEventButton *ev)
return true; return true;
} else { } else {
if (ev->button == 1) { 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 ();
} }
} }
} }
} }
}
if (Keyboard::is_context_menu_event (ev)) { if (Keyboard::is_context_menu_event (ev)) {
if (ops_menu == 0) { if (ops_menu == 0) {

View File

@ -132,7 +132,6 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr
bool _follows_playhead; bool _follows_playhead;
bool _accept_on_focus_out; bool _accept_on_focus_out;
bool _off; bool _off;
bool _edit_by_click_field;
bool _negative_allowed; bool _negative_allowed;
bool edit_is_negative; bool edit_is_negative;