summaryrefslogtreecommitdiff
path: root/gtk2_ardour/location_ui.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-08-10 00:28:20 +0000
committerCarl Hetherington <carl@carlh.net>2010-08-10 00:28:20 +0000
commit75d265e38871205c2311a3d1b342e69da72b6057 (patch)
tree3ad4acb1ee4f6ac5f24da161be632341a1f14911 /gtk2_ardour/location_ui.cc
parent507e996d06827505c2aad865dcc08dab4bfece8e (diff)
Setup clock sensitivity with lock correctly.
git-svn-id: svn://localhost/ardour2/branches/3.0@7583 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/location_ui.cc')
-rw-r--r--gtk2_ardour/location_ui.cc23
1 files changed, 15 insertions, 8 deletions
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 ()