diff --git a/src/slic3r/GUI/ButtonsDescription.cpp b/src/slic3r/GUI/ButtonsDescription.cpp index 49298cb058..4cfed171ba 100644 --- a/src/slic3r/GUI/ButtonsDescription.cpp +++ b/src/slic3r/GUI/ButtonsDescription.cpp @@ -18,7 +18,7 @@ namespace GUI { //static ModePaletteComboBox::PalettesMap MODE_PALETTES = static std::vector>> MODE_PALETTES = { - { L("Palette 1"), { "#7DF028", "#FFDC00", "#E70000" } }, + { L("Palette 1 (default)"), { "#7DF028", "#FFDC00", "#E70000" } }, { L("Palette 2"), { "#FC766A", "#B0B8B4", "#184A45" } }, { L("Palette 3"), { "#567572", "#964F4C", "#696667" } }, { L("Palette 4"), { "#DA291C", "#56A8CB", "#53A567" } }, diff --git a/src/slic3r/GUI/SavePresetDialog.cpp b/src/slic3r/GUI/SavePresetDialog.cpp index 40f9817227..a3177906f2 100644 --- a/src/slic3r/GUI/SavePresetDialog.cpp +++ b/src/slic3r/GUI/SavePresetDialog.cpp @@ -185,6 +185,17 @@ void SavePresetDialog::Item::update() m_valid_type = ValidationType::NoValid; } +#ifdef __WXMSW__ + const int max_path_length = MAX_PATH; +#else + const int max_path_length = 255; +#endif + + if (m_valid_type == ValidationType::Valid && m_presets->path_from_name(m_preset_name).length() >= max_path_length) { + info_line = _L("The name is too long."); + m_valid_type = ValidationType::NoValid; + } + if (m_valid_type == ValidationType::Valid && m_preset_name.find_first_of(' ') == 0) { info_line = _L("The name cannot start with space character."); m_valid_type = ValidationType::NoValid;