Setup clock sensitivity with lock correctly.
authorCarl Hetherington <carl@carlh.net>
Tue, 10 Aug 2010 00:28:20 +0000 (00:28 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 10 Aug 2010 00:28:20 +0000 (00:28 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7583 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/location_ui.cc
gtk2_ardour/location_ui.h

index d2c1a1931fb8b0f128ae08347c38593a693207ad..cf6862f2d6c55343ec5680be5b95e4916345abc9 100644 (file)
@@ -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 ()
index b2b7174d8f9a9ea26ca9454bbd5ff9db3f1a1d6e..2e9e23617702ae44cf6409827f29b7d448439a8c 100644 (file)
@@ -134,6 +134,8 @@ class LocationEditRow  : public Gtk::HBox, public ARDOUR::SessionHandlePtr
        void lock_changed (ARDOUR::Location *);
        void position_lock_style_changed (ARDOUR::Location *);
 
+       void set_clock_sensitivity ();
+
        PBD::ScopedConnectionList connections;
 };