rationalize where a TimeAxisView::_size_menu is detached from its parent menu
This happens before the parent menu is deleted and rebuilt
This commit is contained in:
parent
03db585f24
commit
95c674e3be
@ -632,6 +632,10 @@ RouteTimeAxisView::build_display_menu ()
|
||||
|
||||
/* prepare it */
|
||||
|
||||
if (automation_action_menu) {
|
||||
detach_menu (*automation_action_menu);
|
||||
}
|
||||
|
||||
TimeAxisView::build_display_menu ();
|
||||
|
||||
/* now fill it with our stuff */
|
||||
@ -649,9 +653,6 @@ RouteTimeAxisView::build_display_menu ()
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
if (_size_menu) {
|
||||
detach_menu (*_size_menu);
|
||||
}
|
||||
build_size_menu ();
|
||||
items.push_back (MenuElem (_("Height"), *_size_menu));
|
||||
items.push_back (SeparatorElem());
|
||||
|
@ -807,6 +807,10 @@ TimeAxisView::build_display_menu ()
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
if (_size_menu) {
|
||||
Gtkmm2ext::detach_menu (*_size_menu);
|
||||
}
|
||||
|
||||
delete display_menu;
|
||||
|
||||
display_menu = new Menu;
|
||||
|
@ -451,9 +451,7 @@ VCATimeAxisView::build_display_menu ()
|
||||
|
||||
MenuList& items = display_menu->items();
|
||||
items.push_back (MenuElem (_("Color..."), sigc::mem_fun (*this, &VCATimeAxisView::choose_color)));
|
||||
if (_size_menu) {
|
||||
detach_menu (*_size_menu);
|
||||
}
|
||||
|
||||
build_size_menu ();
|
||||
items.push_back (MenuElem (_("Height"), *_size_menu));
|
||||
items.push_back (SeparatorElem());
|
||||
|
Loading…
Reference in New Issue
Block a user