mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
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:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user