mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Unsaved Changes : implemented "move" and improved "save"
UnsavedChangesDialog : some code refactoring SavePresetDialog : processed empty name for the preset
This commit is contained in:
parent
491e7b16f9
commit
d7176c64bd
5 changed files with 90 additions and 84 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue