diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-04-22 21:39:03 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-22 21:39:03 +0200 |
| commit | 764c35279cf79e96a9d738ad86625bc3137fc8d7 (patch) | |
| tree | 0f778d72bc5c8bb74dfbacd07ea570b15eaf28d7 /src/wx/dcpomatic_choice.cc | |
| parent | a046e7fedb6d6e6703e36999fc6b6183252f0438 (diff) | |
| parent | b74f594ce1dee47fdb5cbeebdc3d6577cdd1cab8 (diff) | |
Merge branch 'mpeg2' into v2.17.xv2.17.16
Diffstat (limited to 'src/wx/dcpomatic_choice.cc')
| -rw-r--r-- | src/wx/dcpomatic_choice.cc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/wx/dcpomatic_choice.cc b/src/wx/dcpomatic_choice.cc index 2f1a6f0e9..f2e215439 100644 --- a/src/wx/dcpomatic_choice.cc +++ b/src/wx/dcpomatic_choice.cc @@ -40,14 +40,14 @@ Choice::Choice(wxWindow* parent) void -Choice::add(string const& entry) +Choice::add_entry(string const& entry) { - add(std_to_wx(entry)); + add_entry(std_to_wx(entry)); } void -Choice::add(wxString const& entry) +Choice::add_entry(wxString const& entry) { if (_needs_clearing) { Clear(); @@ -59,7 +59,7 @@ Choice::add(wxString const& entry) void -Choice::add(wxString const& entry, wxClientData* data) +Choice::add_entry(wxString const& entry, wxClientData* data) { if (_needs_clearing) { Clear(); @@ -71,7 +71,7 @@ Choice::add(wxString const& entry, wxClientData* data) void -Choice::add(wxString const& entry, wxString const& data) +Choice::add_entry(wxString const& entry, wxString const& data) { if (_needs_clearing) { Clear(); @@ -83,6 +83,18 @@ Choice::add(wxString const& entry, wxString const& data) void +Choice::set_entries(wxArrayString const& entries) +{ + if (GetStrings() == entries) { + return; + } + + Clear(); + Set(entries); +} + + +void Choice::set(int index) { SetSelection(index); |
