Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/slic3r/GUI/CreatePresetsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • !serial_str.IsEmpty() is not needed here, check line 1022
  • or leave it blank. in the message dilaog is not OK here since we dont accpet empty string as checked above

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);
Expand Down
Loading