1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-30 23:49:28 +02:00

Bug1300, improved: don't truncate the pasted string

This commit is contained in:
Paul Licameli 2016-06-29 13:42:37 -04:00
parent bbd369df1b
commit 9036c00152

View File

@ -630,10 +630,12 @@ int FileDialog::ShowModal()
wxTheClipboard->GetData(data);
wxTheClipboard->Close();
wxString text = data.GetText();
auto rawText = text.utf8_str();
auto length = text.Length();
NSString *myString = [[NSString alloc]
initWithCharacters:
(unsigned short*)text.c_str().AsWChar()
length:text.Length()
initWithBytes:rawText.data()
length: rawText.length()
encoding: NSUTF8StringEncoding
];
[sPanel setNameFieldStringValue:myString];
[myString release];