mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-16 20:58:43 -04:00
Basic support is here for user labels, even if DataTree only support 8bit strings
Regenerated fonts with up to 254 characters. Rendering is OK, but DataTree do not able to save it...
This commit is contained in:
@@ -41,7 +41,8 @@ DemodLabelDialog::DemodLabelDialog(wxWindow * parent, wxWindowID id, const wxStr
|
||||
void DemodLabelDialog::OnChar(wxKeyEvent& event) {
|
||||
int c = event.GetKeyCode();
|
||||
|
||||
std::string strValue = dialogText->GetValue().ToStdString();
|
||||
//we support 16 bit strings for user labels internally.
|
||||
std::wstring strValue = dialogText->GetValue().ToStdWstring();
|
||||
|
||||
switch (c) {
|
||||
case WXK_RETURN:
|
||||
@@ -52,7 +53,7 @@ void DemodLabelDialog::OnChar(wxKeyEvent& event) {
|
||||
activeDemod->setDemodulatorUserLabel(strValue);
|
||||
}
|
||||
else {
|
||||
activeDemod->setDemodulatorUserLabel("");
|
||||
activeDemod->setDemodulatorUserLabel(L"");
|
||||
}
|
||||
|
||||
Close();
|
||||
@@ -67,7 +68,7 @@ void DemodLabelDialog::OnChar(wxKeyEvent& event) {
|
||||
wxTheClipboard->Open();
|
||||
wxTextDataObject data;
|
||||
wxTheClipboard->GetData(data);
|
||||
std::string clipText = data.GetText().ToStdString();
|
||||
std::wstring clipText = data.GetText().ToStdWstring();
|
||||
wxTheClipboard->SetData(new wxTextDataObject(clipText));
|
||||
wxTheClipboard->Close();
|
||||
event.Skip();
|
||||
|
||||
Reference in New Issue
Block a user