Option to hide "-none-" from instrument dropdown

This is useful for the audition instrument selector.
This commit is contained in:
Robin Gareus 2021-04-16 22:25:41 +02:00
parent c0fe67427d
commit 209536a967
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 14 additions and 9 deletions

View file

@ -39,7 +39,7 @@ class Editor;
class InstrumentSelector : public Gtk::ComboBox
{
public:
InstrumentSelector();
InstrumentSelector (bool allow_none = true);
ARDOUR::PluginInfoPtr selected_instrument () const;
std::string selected_instrument_name () const;
@ -61,6 +61,7 @@ private:
InstrumentListColumns _instrument_list_columns;
uint32_t _reasonable_synth_id;
uint32_t _gmsynth_id;
bool _allow_none;
PBD::ScopedConnection _update_connection;
};