Setup clock sensitivity with lock correctly.

git-svn-id: svn://localhost/ardour2/branches/3.0@7583 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-08-10 00:28:20 +00:00
parent 507e996d06
commit 75d265e388
2 changed files with 17 additions and 8 deletions

View file

@ -293,9 +293,7 @@ LocationEditRow::set_location (Location *loc)
length_clock.hide(); length_clock.hide();
} }
start_clock.set_sensitive (!location->locked()); set_clock_sensitivity ();
end_clock.set_sensitive (!location->locked());
length_clock.set_sensitive (!location->locked());
--i_am_the_modifier; --i_am_the_modifier;
@ -383,7 +381,9 @@ LocationEditRow::go_button_pressed (LocationPart part)
void void
LocationEditRow::clock_changed (LocationPart part) LocationEditRow::clock_changed (LocationPart part)
{ {
if (i_am_the_modifier || !location) return; if (i_am_the_modifier || !location) {
return;
}
switch (part) { switch (part) {
case LocStart: case LocStart:
@ -397,7 +397,6 @@ LocationEditRow::clock_changed (LocationPart part)
default: default:
break; break;
} }
} }
void void
@ -603,9 +602,7 @@ LocationEditRow::location_changed (ARDOUR::Location *loc)
end_clock.set (location->end()); end_clock.set (location->end());
length_clock.set (location->length()); length_clock.set (location->length());
start_clock.set_sensitive (!location->locked()); set_clock_sensitivity ();
end_clock.set_sensitive (!location->locked());
length_clock.set_sensitive (!location->locked());
i_am_the_modifier--; i_am_the_modifier--;
@ -638,6 +635,8 @@ LocationEditRow::lock_changed (ARDOUR::Location *loc)
lock_check_button.set_active (location->locked()); lock_check_button.set_active (location->locked());
set_clock_sensitivity ();
i_am_the_modifier--; i_am_the_modifier--;
} }
@ -1011,6 +1010,14 @@ LocationUI::session_going_away()
SessionHandlePtr::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 () LocationUIWindow::LocationUIWindow ()

View file

@ -134,6 +134,8 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr
void lock_changed (ARDOUR::Location *); void lock_changed (ARDOUR::Location *);
void position_lock_style_changed (ARDOUR::Location *); void position_lock_style_changed (ARDOUR::Location *);
void set_clock_sensitivity ();
PBD::ScopedConnectionList connections; PBD::ScopedConnectionList connections;
}; };