mirror of https://github.com/odrling/Aegisub
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:
parent
d7b01edc64
commit
42a8a55b51
|
@ -116,7 +116,7 @@ public:
|
||||||
if (col == 0) {
|
if (col == 0) {
|
||||||
wxArrayString toks = wxSplit(variant.GetString(), '-');
|
wxArrayString toks = wxSplit(variant.GetString(), '-');
|
||||||
std::vector<std::string> keys;
|
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);
|
transform(toks.begin(), toks.end(), back_inserter(keys), (std::string(*)(wxString const&))&from_wx);
|
||||||
combo = Combo(combo.Context(), combo.CmdName(), keys);
|
combo = Combo(combo.Context(), combo.CmdName(), keys);
|
||||||
cmd_str = combo.Str();
|
cmd_str = combo.Str();
|
||||||
|
|
Loading…
Reference in New Issue