Fix setting hotkeys

Populating a vector by resizing it to the target size then using
push_back does not work very well.
This commit is contained in:
Thomas Goyne 2012-11-27 16:14:06 -08:00
parent d7b01edc64
commit 42a8a55b51

View file

@ -116,7 +116,7 @@ public:
if (col == 0) {
wxArrayString toks = wxSplit(variant.GetString(), '-');
std::vector<std::string> keys;
keys.resize(toks.size());
keys.reserve(toks.size());
transform(toks.begin(), toks.end(), back_inserter(keys), (std::string(*)(wxString const&))&from_wx);
combo = Combo(combo.Context(), combo.CmdName(), keys);
cmd_str = combo.Str();