mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
FIX:fixed task name too long causing HTTP request failure
Change-Id: I912b1a9c64038c6f236d76bec670a7369d47579a
This commit is contained in:
parent
85d7baf79c
commit
4892a0491c
2 changed files with 10 additions and 0 deletions
|
@ -253,6 +253,11 @@ void PrintJob::process()
|
||||||
if (params.preset_name.empty()) {params.preset_name = wxString::Format("%s_plate_%d", m_project_name, curr_plate_idx).ToStdString();}
|
if (params.preset_name.empty()) {params.preset_name = wxString::Format("%s_plate_%d", m_project_name, curr_plate_idx).ToStdString();}
|
||||||
if (params.project_name.empty()) {params.project_name = m_project_name;}
|
if (params.project_name.empty()) {params.project_name = m_project_name;}
|
||||||
|
|
||||||
|
//Prevent string length from exceeding 100 bytes
|
||||||
|
if (params.project_name.size() >= 100) {
|
||||||
|
params.project_name = params.project_name.substr(0, 99);
|
||||||
|
}
|
||||||
|
|
||||||
wxString error_text;
|
wxString error_text;
|
||||||
wxString msg_text;
|
wxString msg_text;
|
||||||
|
|
||||||
|
|
|
@ -2842,6 +2842,11 @@ void SelectMachineDialog::on_rename_enter()
|
||||||
m_valid_type = NoValid;
|
m_valid_type = NoValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_valid_type == Valid && new_file_name.size() >= 100) {
|
||||||
|
info_line = _L("The name length exceeds the limit.");
|
||||||
|
m_valid_type = NoValid;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_valid_type != Valid) {
|
if (m_valid_type != Valid) {
|
||||||
MessageDialog msg_wingow(nullptr, info_line, "", wxICON_WARNING | wxOK);
|
MessageDialog msg_wingow(nullptr, info_line, "", wxICON_WARNING | wxOK);
|
||||||
if (msg_wingow.ShowModal() == wxID_OK) {
|
if (msg_wingow.ShowModal() == wxID_OK) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue