- alignment_items.push_back (RadioMenuElem (align_group, _("Align With Capture Time"),
- sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::set_align_style), CaptureTime)));
- align_capture_item = dynamic_cast<RadioMenuItem*>(&alignment_items.back());
- if (track()->alignment_style() == CaptureTime) {
- align_capture_item->set_active();
- }
+ /* We're not connecting to signal_toggled() here; in the case where these two items are
+ set to be in the `inconsistent' state, it seems that one or other will end up active
+ as well as inconsistent (presumably due to the RadioMenuItem::Group). Then when you
+ select the active one, no toggled signal is emitted so nothing happens.
+ */
+
+ layers_items.push_back (RadioMenuElem (layers_group, _("Overlaid")));
+ RadioMenuItem* i = dynamic_cast<RadioMenuItem*> (&layers_items.back ());
+ i->set_active (overlaid != 0 && stacked == 0);
+ i->set_inconsistent (overlaid != 0 && stacked != 0);
+ i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Overlaid, true));
+
+ layers_items.push_back (
+ RadioMenuElem (layers_group, _("Stacked"),
+ sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Stacked, true))
+ );
+
+ i = dynamic_cast<RadioMenuItem*> (&layers_items.back ());
+ i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Stacked, true));
+ i->set_active (overlaid == 0 && stacked != 0);
+ i->set_inconsistent (overlaid != 0 && stacked != 0);
+
+ items.push_back (MenuElem (_("Layers"), *layers_menu));