From 75d265e38871205c2311a3d1b342e69da72b6057 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 10 Aug 2010 00:28:20 +0000 Subject: Setup clock sensitivity with lock correctly. git-svn-id: svn://localhost/ardour2/branches/3.0@7583 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/location_ui.cc | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'gtk2_ardour/location_ui.cc') diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index d2c1a1931f..cf6862f2d6 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -293,9 +293,7 @@ LocationEditRow::set_location (Location *loc) length_clock.hide(); } - start_clock.set_sensitive (!location->locked()); - end_clock.set_sensitive (!location->locked()); - length_clock.set_sensitive (!location->locked()); + set_clock_sensitivity (); --i_am_the_modifier; @@ -383,7 +381,9 @@ LocationEditRow::go_button_pressed (LocationPart part) void LocationEditRow::clock_changed (LocationPart part) { - if (i_am_the_modifier || !location) return; + if (i_am_the_modifier || !location) { + return; + } switch (part) { case LocStart: @@ -397,7 +397,6 @@ LocationEditRow::clock_changed (LocationPart part) default: break; } - } void @@ -603,9 +602,7 @@ LocationEditRow::location_changed (ARDOUR::Location *loc) end_clock.set (location->end()); length_clock.set (location->length()); - start_clock.set_sensitive (!location->locked()); - end_clock.set_sensitive (!location->locked()); - length_clock.set_sensitive (!location->locked()); + set_clock_sensitivity (); i_am_the_modifier--; @@ -638,6 +635,8 @@ LocationEditRow::lock_changed (ARDOUR::Location *loc) lock_check_button.set_active (location->locked()); + set_clock_sensitivity (); + i_am_the_modifier--; } @@ -1011,6 +1010,14 @@ LocationUI::session_going_away() SessionHandlePtr::session_going_away (); } +void +LocationEditRow::set_clock_sensitivity () +{ + start_clock.set_sensitive (!location->locked()); + end_clock.set_sensitive (!location->locked()); + length_clock.set_sensitive (!location->locked()); +} + /*------------------------*/ LocationUIWindow::LocationUIWindow () -- cgit v1.2.3