Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs/src
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2018-06-25 12:40:40 +0300
committerYuSanka <yusanka@gmail.com>2018-06-25 12:40:40 +0300
commit362a9d8edad4ba02ea476f18428b2dd1a12f5fe6 (patch)
tree43d4f0fa96123fbdd736c3772f13c6a656f5e10a /xs/src
parent7d15a15e1443003681cb33753f2d01dbbc2a2666 (diff)
Fixed bug #995
Diffstat (limited to 'xs/src')
-rw-r--r--xs/src/slic3r/GUI/Tab.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp
index 6eabc2f47..94f8cc3ea 100644
--- a/xs/src/slic3r/GUI/Tab.cpp
+++ b/xs/src/slic3r/GUI/Tab.cpp
@@ -2619,14 +2619,24 @@ void SavePresetWindow::accept()
if (!m_chosen_name.empty()) {
const char* unusable_symbols = "<>:/\\|?*\"";
bool is_unusable_symbol = false;
+ bool is_unusable_postfix = false;
+ const std::string unusable_postfix = "(modified)";
for (size_t i = 0; i < std::strlen(unusable_symbols); i++){
if (m_chosen_name.find_first_of(unusable_symbols[i]) != std::string::npos){
is_unusable_symbol = true;
break;
}
}
+ if (m_chosen_name.find(unusable_postfix) != std::string::npos)
+ is_unusable_postfix = true;
+
if (is_unusable_symbol) {
- show_error(this, _(L("The supplied name is not valid; the following characters are not allowed:"))+" <>:/\\|?*\"");
+ show_error(this,_(L("The supplied name is not valid;")) + "\n" +
+ _(L("the following characters are not allowed:")) + " <>:/\\|?*\"");
+ }
+ else if (is_unusable_postfix){
+ show_error(this, _(L("The supplied name is not valid;")) + "\n" +
+ _(L("the following postfix are not allowed:")) + "\n\t" + unusable_postfix);
}
else if (m_chosen_name.compare("- default -") == 0) {
show_error(this, _(L("The supplied name is not available.")));