13
0

Fix ever expanding bank selector in add patch change dialog when changing channel number.

git-svn-id: svn://localhost/ardour2/branches/3.0@13909 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2013-01-20 00:52:05 +00:00
parent 88de45b7cc
commit 4cdcacb6b3

View File

@ -40,13 +40,12 @@ using namespace Gtkmm2ext;
/** @param tc If non-0, a time converter for this patch change. If 0, time control will be desensitized */
PatchChangeDialog::PatchChangeDialog (
const ARDOUR::BeatsFramesConverter* tc,
ARDOUR::Session* session,
const ARDOUR::BeatsFramesConverter* tc,
ARDOUR::Session* session,
Evoral::PatchChange<Evoral::MusicalTime> const & patch,
ARDOUR::InstrumentInfo& info,
const Gtk::BuiltinStockID& ok,
bool allow_delete
)
ARDOUR::InstrumentInfo& info,
const Gtk::BuiltinStockID& ok,
bool allow_delete)
: ArdourDialog (_("Patch Change"), true)
, _time_converter (tc)
, _info (info)
@ -160,6 +159,8 @@ PatchChangeDialog::patch () const
void
PatchChangeDialog::fill_bank_combo ()
{
_bank_combo.clear ();
boost::shared_ptr<MIDI::Name::ChannelNameSet> cns = _info.get_patches (_channel.get_value_as_int() - 1);
if (!cns) {