Add Choice::add() with a client string.
[dcpomatic.git] / src / wx / dcpomatic_choice.cc
index cf43b13edc2a8ba1e6b0954db64816b80f3a424c..b639dd0f912540c5e8e060784970dac16599764a 100644 (file)
@@ -70,6 +70,18 @@ Choice::add(wxString const& entry, wxClientData* data)
 }
 
 
+void
+Choice::add(wxString const& entry, wxString const& data)
+{
+       if (_needs_clearing) {
+               Clear();
+               _needs_clearing = false;
+       }
+
+       Append(entry, new wxStringClientData(data));
+}
+
+
 void
 Choice::set(int index)
 {