FIX:displayed error file name
If the file name sent to the printer is changed to be too long, the final display format is incorrect Jira:STUDIO-3137 Change-Id: Ia2a542a559ae8ff0343b159cff9e0317397e866f
This commit is contained in:
parent
7be9b591b8
commit
55453af689
|
@ -2868,6 +2868,18 @@ void SelectMachineDialog::on_rename_enter()
|
||||||
}
|
}
|
||||||
|
|
||||||
auto new_file_name = m_rename_input->GetTextCtrl()->GetValue();
|
auto new_file_name = m_rename_input->GetTextCtrl()->GetValue();
|
||||||
|
wxString temp;
|
||||||
|
int num = 0;
|
||||||
|
for (auto t : new_file_name) {
|
||||||
|
if (t == wxString::FromUTF8("\x20")) {
|
||||||
|
num++;
|
||||||
|
if (num == 1) temp += t;
|
||||||
|
} else {
|
||||||
|
num = 0;
|
||||||
|
temp += t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new_file_name = temp;
|
||||||
auto m_valid_type = Valid;
|
auto m_valid_type = Valid;
|
||||||
wxString info_line;
|
wxString info_line;
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,20 @@ void SendToPrinterDialog::on_rename_enter()
|
||||||
}
|
}
|
||||||
|
|
||||||
auto new_file_name = m_rename_input->GetTextCtrl()->GetValue();
|
auto new_file_name = m_rename_input->GetTextCtrl()->GetValue();
|
||||||
|
|
||||||
|
wxString temp;
|
||||||
|
int num = 0;
|
||||||
|
for (auto t : new_file_name) {
|
||||||
|
if (t == wxString::FromUTF8("\x20")) {
|
||||||
|
num++;
|
||||||
|
if (num == 1) temp += t;
|
||||||
|
} else {
|
||||||
|
num = 0;
|
||||||
|
temp += t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new_file_name = temp;
|
||||||
|
|
||||||
auto m_valid_type = Valid;
|
auto m_valid_type = Valid;
|
||||||
wxString info_line;
|
wxString info_line;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue