mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
Fix crash on opening region menu.
git-svn-id: svn://localhost/ardour2/branches/3.0@8027 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a46af0460b
commit
1a9bd134d2
2 changed files with 9 additions and 4 deletions
|
|
@ -1842,7 +1842,7 @@ Editor::add_region_context_items (Menu_Helpers::MenuList& edit_items, bool multi
|
||||||
|
|
||||||
edit_items.push_back (*_popup_region_menu_item);
|
edit_items.push_back (*_popup_region_menu_item);
|
||||||
if (multiple_regions_at_position && (layering_order_editor == 0 || !layering_order_editor->is_visible ())) {
|
if (multiple_regions_at_position && (layering_order_editor == 0 || !layering_order_editor->is_visible ())) {
|
||||||
edit_items.push_back (action_menu_item ("choose-top-region"));
|
edit_items.push_back (*manage (_region_actions->get_action ("choose-top-region")->create_menu_item ()));
|
||||||
}
|
}
|
||||||
edit_items.push_back (SeparatorElem());
|
edit_items.push_back (SeparatorElem());
|
||||||
}
|
}
|
||||||
|
|
@ -5507,6 +5507,9 @@ Editor::setup_fade_images ()
|
||||||
Gtk::MenuItem&
|
Gtk::MenuItem&
|
||||||
Editor::action_menu_item (std::string const & name)
|
Editor::action_menu_item (std::string const & name)
|
||||||
{
|
{
|
||||||
return *manage (editor_actions->get_action(name)->create_menu_item ());
|
Glib::RefPtr<Action> a = editor_actions->get_action (name);
|
||||||
|
assert (a);
|
||||||
|
|
||||||
|
return *manage (a->create_menu_item ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1275,11 +1275,12 @@ Editor::toggle_internal_editing ()
|
||||||
|
|
||||||
/* Convenience functions to slightly reduce verbosity below */
|
/* Convenience functions to slightly reduce verbosity below */
|
||||||
|
|
||||||
static void
|
static RefPtr<Action>
|
||||||
reg_sens (RefPtr<ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot)
|
reg_sens (RefPtr<ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot)
|
||||||
{
|
{
|
||||||
RefPtr<Action> act = ActionManager::register_action (group, name, label, slot);
|
RefPtr<Action> act = ActionManager::register_action (group, name, label, slot);
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
return act;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -1547,7 +1548,8 @@ Editor::register_region_actions ()
|
||||||
sigc::bind (sigc::mem_fun (*this, &Editor::align_regions_relative), ARDOUR::SyncPoint)
|
sigc::bind (sigc::mem_fun (*this, &Editor::align_regions_relative), ARDOUR::SyncPoint)
|
||||||
);
|
);
|
||||||
|
|
||||||
reg_sens (_region_actions, "choose-top-region", _("Choose Top..."), mem_fun (*this, &Editor::change_region_layering_order));
|
Glib::RefPtr<Action> a = reg_sens (_region_actions, "choose-top-region", _("Choose Top..."), mem_fun (*this, &Editor::change_region_layering_order));
|
||||||
|
a->set_accel_group (get_accel_group ());
|
||||||
|
|
||||||
_all_region_actions_sensitized = true;
|
_all_region_actions_sensitized = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue