diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-04-03 17:58:39 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-04-03 18:54:51 -0600 |
commit | d1e55ff5b7b4e7f9da32ff05898487aff7d8bdc2 (patch) | |
tree | a6e7f0ff984543b223f8adef261da0fc74b63f4d /gtk2_ardour/route_time_axis.cc | |
parent | 1c53e73599ca14eb4f73f8b0ea552efb95ab53ec (diff) |
add RouteTimeAxis::toggle_layer_display()
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 6eab8137e7..d092f58a45 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -2325,6 +2325,28 @@ RouteTimeAxisView::blink_rec_display (bool onoff) } void +RouteTimeAxisView::toggle_layer_display () +{ + /* this is a bit of a hack, but we implement toggle via the menu items, + in order to keep them in sync with the visual state. + */ + + if (!is_track()) { + return; + } + + if (!display_menu) { + build_display_menu (); + } + + if (dynamic_cast<RadioMenuItem*>(overlaid_menu_item)->get_active()) { + dynamic_cast<RadioMenuItem*>(stacked_menu_item)->set_active (true); + } else { + dynamic_cast<RadioMenuItem*>(overlaid_menu_item)->set_active (true); + } +} + +void RouteTimeAxisView::set_layer_display (LayerDisplay d, bool apply_to_selection) { if (_ignore_set_layer_display) { |