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
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-03-07 12:26:40 +0300
committerbubnikv <bubnikv@gmail.com>2020-03-07 12:26:40 +0300
commit1efa21c88293dc6c62284655ff98b9462f3c9d37 (patch)
tree9909ca67f17eae75eeb9b96ef53422f4dd7f6870 /src/slic3r
parent5052ef88db0a38e2bde638d1164220e930b0c527 (diff)
Polished the new "detach preset from the system preset" messages.
Diffstat (limited to 'src/slic3r')
-rw-r--r--src/slic3r/GUI/Tab.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index 0c08fcb29..8e49b3ad4 100644
--- a/src/slic3r/GUI/Tab.cpp
+++ b/src/slic3r/GUI/Tab.cpp
@@ -969,20 +969,19 @@ void Tab::build_preset_description_line(ConfigOptionsGroup* optgroup)
btn->Bind(wxEVT_BUTTON, [this, parent](wxCommandEvent&)
{
- wxString msg_text;
-
- if (m_presets->get_edited_preset().is_system)
- msg_text = _(L("You want to detach system preset. \n"
- "New preset will be created as a copy of the current preset.\n"
- "Created preset will be detached from system parent preset.")) + "\n\n";
- else
- msg_text = _(L("You want to detach current custom preset from the system parent preset. \n"
- "This action is not revertable.")) + "\n\n";
-
- msg_text += _(L("Are you sure you want to continue?"));
-
- wxMessageDialog dialog(parent, msg_text, _(L("Detach preset")), wxICON_WARNING | wxYES_NO);
+ bool system = m_presets->get_edited_preset().is_system;
+ bool dirty = m_presets->get_edited_preset().is_dirty;
+ wxString msg_text = system ?
+ _(L("A copy of the current system preset will be created, which will be detached from the system preset.")) :
+ _(L("The current custom preset will be detached from the parent system preset."));
+ if (dirty) {
+ msg_text += "\n\n";
+ msg_text += _(L("Modifications to the current profile will be saved."));
+ }
+ msg_text += "\n\n";
+ msg_text += _(L("This action is not revertable.\nDo you want to proceed?"));
+ wxMessageDialog dialog(parent, msg_text, _(L("Detach preset")), wxICON_WARNING | wxYES_NO | wxCANCEL);
if (dialog.ShowModal() == wxID_YES)
save_preset(m_presets->get_edited_preset().is_system ? std::string() : m_presets->get_edited_preset().name, true);
});