mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Unsaved Changes : implemented "move" and improved "save"
UnsavedChangesDialog : some code refactoring SavePresetDialog : processed empty name for the preset
This commit is contained in:
@@ -1123,10 +1123,12 @@ void SavePresetDialog::Item::update()
|
||||
info_line = _L("Cannot overwrite a system profile.");
|
||||
m_valid_type = NoValid;
|
||||
}
|
||||
|
||||
if (m_valid_type == Valid && existing && (existing->is_external)) {
|
||||
info_line = _L("Cannot overwrite an external profile.");
|
||||
m_valid_type = NoValid;
|
||||
}
|
||||
|
||||
if (m_valid_type == Valid && existing && m_preset_name != m_presets->get_selected_preset_name())
|
||||
{
|
||||
info_line = from_u8((boost::format(_u8L("Preset with name \"%1%\" already exists.")) % m_preset_name).str()) + "\n" +
|
||||
@@ -1134,6 +1136,11 @@ void SavePresetDialog::Item::update()
|
||||
m_valid_type = Warning;
|
||||
}
|
||||
|
||||
if (m_valid_type == Valid && m_preset_name.empty()) {
|
||||
info_line = _L("The empty name is not available.");
|
||||
m_valid_type = NoValid;
|
||||
}
|
||||
|
||||
m_valid_label->SetLabel(info_line);
|
||||
m_valid_label->Show(!info_line.IsEmpty());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user