summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-02 13:02:01 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-02 13:02:01 +0000
commit2010c0489fb1e482d54c008f6c58fc64e6c406cf (patch)
tree58e5da63dda75488ee4b3a4718294fcc887ca74c /gtk2_ardour/editor_ops.cc
parente16bb2a07826592f26dd200160358bf37453bb9d (diff)
Put MIDNAM stuff into the patch change dialog.
git-svn-id: svn://localhost/ardour2/branches/3.0@12539 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc8
1 files changed, 7 insertions, 1 deletions
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<MidiRegionView*> (rs.front ());
+
Evoral::PatchChange<Evoral::MusicalTime> 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;