Eliminate a pointless roundtrip through wxString when copying styles to the clipboard

This commit is contained in:
Thomas Goyne 2013-08-08 20:18:12 -07:00
parent 74fbe22afe
commit 106fb663c7
1 changed files with 2 additions and 2 deletions

View File

@ -459,15 +459,15 @@ void DialogStyleManager::OnCopyToCurrent() {
template<class T>
void DialogStyleManager::CopyToClipboard(wxListBox *list, T const& v) {
wxString data;
wxArrayInt selections;
list->GetSelections(selections);
std::string data;
for(size_t i = 0; i < selections.size(); ++i) {
if (i) data += "\r\n";
AssStyle *s = v[selections[i]];
s->UpdateData();
data += to_wx(s->GetEntryData());
data += s->GetEntryData();
}
SetClipboard(data);