Merge pull request #3276 from smurfix/upstream2

Don't show a confirmation dialog when simply saving a preset
This commit is contained in:
Oleksandra Yushchenko 2020-01-21 15:13:12 +01:00 committed by GitHub
commit 1bbee1c5cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -4914,7 +4914,7 @@ msgid "Cannot overwrite an external profile."
msgstr ""
#: src/slic3r/GUI/Tab.cpp:3038
msgid "Preset with name \"%1%\" already exist."
msgid "Preset with name \"%1%\" already exists."
msgstr ""
#: src/slic3r/GUI/Tab.cpp:3039

View File

@ -3033,9 +3033,9 @@ void Tab::save_preset(std::string name /*= ""*/)
show_error(this, _(L("Cannot overwrite an external profile.")));
return;
}
if (existing/* && name != preset.name*/)
if (existing && name != preset.name)
{
wxString msg_text = GUI::from_u8((boost::format(_utf8(L("Preset with name \"%1%\" already exist."))) % name).str());
wxString msg_text = GUI::from_u8((boost::format(_utf8(L("Preset with name \"%1%\" already exists."))) % name).str());
msg_text += "\n" + _(L("Replace?"));
wxMessageDialog dialog(nullptr, msg_text, _(L("Warning")), wxICON_WARNING | wxYES | wxNO);