Don't recompute child heights when building the route time axis view menu.

git-svn-id: svn://localhost/ardour2/branches/3.0@12709 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-06-13 20:37:07 +00:00
parent 1363837a6f
commit 5c60eea32a
2 changed files with 11 additions and 6 deletions

View File

@ -484,21 +484,21 @@ RouteTimeAxisView::build_display_menu ()
select the active one, no toggled signal is emitted so nothing happens.
*/
_ignore_set_layer_display = true;
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))
);
layers_items.push_back (RadioMenuElem (layers_group, _("Stacked")));
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);
i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Stacked, true));
_ignore_set_layer_display = false;
items.push_back (MenuElem (_("Layers"), *layers_menu));
@ -2175,6 +2175,10 @@ RouteTimeAxisView::update_rec_display ()
void
RouteTimeAxisView::set_layer_display (LayerDisplay d, bool apply_to_selection)
{
if (_ignore_set_layer_display) {
return;
}
if (apply_to_selection) {
_editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, d, false));
} else {

View File

@ -307,6 +307,7 @@ protected:
UnderlayMirrorList _underlay_mirrors;
bool _ignore_track_mode_change; ///< true to ignore track mode change signals
bool _ignore_set_layer_display;
private: