From e9976f21b5187bbedbfb7471576a16f53897b10e Mon Sep 17 00:00:00 2001 From: BenJule Date: Fri, 22 May 2026 13:57:54 +0200 Subject: [PATCH] fix: warn user when Serial input is invalid/sanitized to empty --- src/slic3r/GUI/CreatePresetsDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slic3r/GUI/CreatePresetsDialog.cpp b/src/slic3r/GUI/CreatePresetsDialog.cpp index c53e10fbe6..98be643e51 100644 --- a/src/slic3r/GUI/CreatePresetsDialog.cpp +++ b/src/slic3r/GUI/CreatePresetsDialog.cpp @@ -1038,6 +1038,12 @@ wxBoxSizer *CreateFilamentPresetDialog::create_button_item() } boost::algorithm::trim(vendor_name); boost::algorithm::trim(serial_name); + if (!serial_str.IsEmpty() && serial_name.empty()) { + MessageDialog dlg(this, _L("The filament serial contains only invalid characters or spaces. Please correct it or leave it blank."), + wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxYES_DEFAULT | wxCENTRE); + dlg.ShowModal(); + return; + } if (vendor_name.empty() || serial_name.empty()) { MessageDialog dlg(this, _L("All inputs in the custom vendor or serial are spaces. Please re-enter."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxYES_DEFAULT | wxCENTRE);