do NOT call ProcessThread::init() **again** inside a freeze op, since this is a static, single-time call that sets up a per-thread (thread-private) storage key. Should fix #4722
git-svn-id: svn://localhost/ardour2/branches/3.0@12736 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -81,41 +81,60 @@ CanvasPatchChange::initialize_popup_menus()
|
||||
|
||||
const ChannelNameSet::PatchBanks& patch_banks = channel_name_set->patch_banks();
|
||||
|
||||
// fill popup menu:
|
||||
Gtk::Menu::MenuList& patch_bank_menus = _popup.items();
|
||||
|
||||
for (ChannelNameSet::PatchBanks::const_iterator bank = patch_banks.begin();
|
||||
bank != patch_banks.end();
|
||||
++bank) {
|
||||
Gtk::Menu& patch_bank_menu = *manage(new Gtk::Menu());
|
||||
|
||||
const PatchBank::PatchNameList& patches = (*bank)->patch_name_list();
|
||||
Gtk::Menu::MenuList& patch_menus = patch_bank_menu.items();
|
||||
if (patch_banks.size() > 1) {
|
||||
// fill popup menu:
|
||||
Gtk::Menu::MenuList& patch_bank_menus = _popup.items();
|
||||
|
||||
for (ChannelNameSet::PatchBanks::const_iterator bank = patch_banks.begin();
|
||||
bank != patch_banks.end();
|
||||
++bank) {
|
||||
Gtk::Menu& patch_bank_menu = *manage(new Gtk::Menu());
|
||||
|
||||
const PatchBank::PatchNameList& patches = (*bank)->patch_name_list();
|
||||
Gtk::Menu::MenuList& patch_menus = patch_bank_menu.items();
|
||||
|
||||
for (PatchBank::PatchNameList::const_iterator patch = patches.begin();
|
||||
patch != patches.end();
|
||||
++patch) {
|
||||
std::string name = (*patch)->name();
|
||||
boost::replace_all (name, "_", " ");
|
||||
|
||||
patch_menus.push_back(
|
||||
Gtk::Menu_Helpers::MenuElem(
|
||||
name,
|
||||
sigc::bind(
|
||||
sigc::mem_fun(*this, &CanvasPatchChange::on_patch_menu_selected),
|
||||
(*patch)->patch_primary_key())) );
|
||||
}
|
||||
|
||||
std::string name = (*bank)->name();
|
||||
boost::replace_all (name, "_", " ");
|
||||
|
||||
patch_bank_menus.push_back(
|
||||
Gtk::Menu_Helpers::MenuElem(
|
||||
name,
|
||||
patch_bank_menu) );
|
||||
}
|
||||
} else {
|
||||
/* only one patch bank, so make it the initial menu */
|
||||
|
||||
const PatchBank::PatchNameList& patches = patch_banks.front()->patch_name_list();
|
||||
Gtk::Menu::MenuList& patch_menus = _popup.items();
|
||||
|
||||
for (PatchBank::PatchNameList::const_iterator patch = patches.begin();
|
||||
patch != patches.end();
|
||||
++patch) {
|
||||
std::string name = (*patch)->name();
|
||||
boost::replace_all (name, "_", " ");
|
||||
|
||||
patch_menus.push_back(
|
||||
Gtk::Menu_Helpers::MenuElem(
|
||||
name,
|
||||
sigc::bind(
|
||||
sigc::mem_fun(*this, &CanvasPatchChange::on_patch_menu_selected),
|
||||
(*patch)->patch_primary_key())) );
|
||||
|
||||
patch_menus.push_back (Gtk::Menu_Helpers::MenuElem (name,
|
||||
sigc::bind (
|
||||
sigc::mem_fun(*this, &CanvasPatchChange::on_patch_menu_selected),
|
||||
(*patch)->patch_primary_key())));
|
||||
}
|
||||
|
||||
std::string name = (*bank)->name();
|
||||
boost::replace_all (name, "_", " ");
|
||||
|
||||
patch_bank_menus.push_back(
|
||||
Gtk::Menu_Helpers::MenuElem(
|
||||
name,
|
||||
patch_bank_menu) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CanvasPatchChange::on_patch_menu_selected(const PatchPrimaryKey& key)
|
||||
{
|
||||
|
||||
@@ -3393,7 +3393,6 @@ Editor::freeze_thread ()
|
||||
/* create event pool because we may need to talk to the session */
|
||||
SessionEvent::create_per_thread_pool ("freeze events", 64);
|
||||
/* create per-thread buffers for process() tree to use */
|
||||
current_interthread_info->process_thread.init ();
|
||||
current_interthread_info->process_thread.get_buffers ();
|
||||
clicked_routeview->audio_track()->freeze_me (*current_interthread_info);
|
||||
current_interthread_info->done = true;
|
||||
|
||||
Reference in New Issue
Block a user