summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-06-11 22:59:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-06-11 22:59:35 +0000
commitd97312d438a813985916dd35f613510e9448441f (patch)
tree5be2844fc16359c2eb550b72c9f84737c534d614 /gtk2_ardour/editor_ops.cc
parentc81691741118ab34c5f6f458c2d84f431e481ada (diff)
lots more work trying to create a common structure for accessing plugin and MIDNAME patch/preset/program names. still not done
git-svn-id: svn://localhost/ardour2/branches/3.0@12665 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index b7462f7c9e..884fe5eb17 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -4730,6 +4730,8 @@ Editor::insert_patch_change (bool from_context)
const framepos_t p = get_preferred_edit_position (false, from_context);
+ cerr << "Got " << rs.size() << " regions to add patch change to\n";
+
/* 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.
@@ -4737,7 +4739,7 @@ Editor::insert_patch_change (bool from_context)
MidiRegionView* first = dynamic_cast<MidiRegionView*> (rs.front ());
Evoral::PatchChange<Evoral::MusicalTime> empty (0, 0, 0, 0);
- PatchChangeDialog d (0, _session, empty, first->model_name(), first->custom_device_mode(), Gtk::Stock::ADD);
+ PatchChangeDialog d (0, _session, empty, first->instrument_info(), Gtk::Stock::ADD);
if (d.run() == RESPONSE_CANCEL) {
return;
@@ -4747,6 +4749,7 @@ Editor::insert_patch_change (bool from_context)
MidiRegionView* const mrv = dynamic_cast<MidiRegionView*> (*i);
if (mrv) {
if (p >= mrv->region()->first_frame() && p <= mrv->region()->last_frame()) {
+ cerr << "Adding patch change @ " << p << " to " << mrv->region()->name() << endl;
mrv->add_patch_change (p - mrv->region()->position(), d.patch ());
}
}