summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-10-04 21:55:44 +0200
committerRobin Gareus <robin@gareus.org>2018-10-04 21:55:44 +0200
commit55596e2bf0ab92ac229cdcdc984785c6c7592270 (patch)
tree48243c2b34ee320b137a2b4c5d417a647b049829
parent07ddf6cb3647b3015b103003996370de9e43a1b1 (diff)
Change color of nudge-buttons depending on selection.
Experimental. This indicates region selection: * nudge region(s): red * nudge playhead or marker(s): default gray This does not indicate marker selection (nudge marker vs playhead), nor does it change when primary-modifier is held (force playhead nudge).
-rw-r--r--gtk2_ardour/editor_selection.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 61699afe09..227eaa4a63 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -1571,8 +1571,20 @@ Editor::region_selection_changed ()
}
}
- if ( _session->solo_selection_active() )
+ if (_session->solo_selection_active()) {
play_solo_selection(false);
+ }
+
+ /* set nudge button color */
+ if (! get_regions_from_selection_and_entered().empty()) {
+ /* nudge regions */
+ nudge_forward_button.set_name ("nudge button");
+ nudge_backward_button.set_name ("nudge button");
+ } else {
+ /* nudge marker or playhead */
+ nudge_forward_button.set_name ("generic button");
+ nudge_backward_button.set_name ("generic button");
+ }
}
void