Fix oddities when replacing VST-presets.
authorRobin Gareus <robin@gareus.org>
Thu, 19 Jan 2017 23:33:44 +0000 (00:33 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 19 Jan 2017 23:50:14 +0000 (00:50 +0100)
commitb084036c87b57c61eb80a6a4d345b8bf9b0c4857
tree9115aa1460f23d55267e0b2dde0800bb576f4774
parent761747760921b5c6b3f4899ca1c40e9aa27bc4a0
Fix oddities when replacing VST-presets.

VST used the count of available of presets as URI:
 - add 2 presets (1,2)
 - remove first, add another one -> two presets with same URI (2,2)

PluginInfo::get_presets() simply lists all (name only) in a vector.
Plugin::find_presets() uses the URI in a map (unique by URI).

..various ensuing bugs: eg. Plugin::remove_preset() looked up by name,
but didn't check for NULL.
libs/ardour/ardour/plugin.h
libs/ardour/luaproc.cc
libs/ardour/plugin.cc
libs/ardour/vst_plugin.cc