Fix ever expanding bank selector in add patch change dialog when changing channel...
authorDavid Robillard <d@drobilla.net>
Sun, 20 Jan 2013 00:52:05 +0000 (00:52 +0000)
committerDavid Robillard <d@drobilla.net>
Sun, 20 Jan 2013 00:52:05 +0000 (00:52 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13909 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/patch_change_dialog.cc

index 97fcb39ae6914ba378e251c05dd72d5eb29dee75..c8394c2848b35ed974b21b2cf406ad9cdae2daf9 100644 (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) {