From 2010c0489fb1e482d54c008f6c58fc64e6c406cf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 2 Jun 2012 13:02:01 +0000 Subject: Put MIDNAM stuff into the patch change dialog. git-svn-id: svn://localhost/ardour2/branches/3.0@12539 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_ops.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/editor_ops.cc') diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 3da3042671..8b83a9ca70 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4720,8 +4720,14 @@ Editor::insert_patch_change (bool from_context) const framepos_t p = get_preferred_edit_position (false, from_context); + /* XXX: bit of a hack; use the MIDNAM from the first selected region; + there may be more than one, but the PatchChangeDialog can only offer + one set of patch menus. + */ + MidiRegionView* first = dynamic_cast (rs.front ()); + Evoral::PatchChange empty (0, 0, 0, 0); - PatchChangeDialog d (0, _session, empty, Gtk::Stock::ADD); + PatchChangeDialog d (0, _session, empty, first->model_name(), first->custom_device_mode(), Gtk::Stock::ADD); if (d.run() == RESPONSE_CANCEL) { return; -- cgit v1.2.3