diff options
author | Robin Gareus <robin@gareus.org> | 2015-12-25 16:20:53 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-12-25 17:12:37 +0100 |
commit | b92f208b521f0e733b123ef5e7552ee26b4d439d (patch) | |
tree | df241ca594caa904d43a407cb8ff6afb850480fb /libs/ardour/instrument_info.cc | |
parent | a8159326b85a6c86ac7a0108b8c9468b7ff23502 (diff) |
don't assume plugin presets start their numbering at zero.
Diffstat (limited to 'libs/ardour/instrument_info.cc')
-rw-r--r-- | libs/ardour/instrument_info.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libs/ardour/instrument_info.cc b/libs/ardour/instrument_info.cc index c673170b72..c30994befc 100644 --- a/libs/ardour/instrument_info.cc +++ b/libs/ardour/instrument_info.cc @@ -175,12 +175,8 @@ InstrumentInfo::plugin_programs_to_channel_name_set (boost::shared_ptr<Processor std::vector<Plugin::PresetRecord>::iterator i; int n; - /* XXX note the assumption that plugin presets start their numbering at - * zero - */ - for (n = 0, i = presets.begin(); i != presets.end(); ++i, ++n) { - if ((*i).number >= 0) { + if ((*i).valid) { patch_list.push_back (boost::shared_ptr<Patch> (new Patch ((*i).label, n))); } else { patch_list.push_back (boost::shared_ptr<Patch> (new Patch (string_compose ("program %1", n), n))); |