mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 06:59:00 +08:00
Refactoring into DiffPresetDialog::is_save_confirmed() to fix build using VisualStudio 2022
This commit is contained in:
parent
c4e133718d
commit
ad1c029935
@ -2016,12 +2016,15 @@ bool DiffPresetDialog::is_save_confirmed()
|
|||||||
|
|
||||||
std::vector<Preset::Type> types_for_save;
|
std::vector<Preset::Type> types_for_save;
|
||||||
|
|
||||||
for (const Preset::Type& type : m_pr_technology == ptFFF ? std::initializer_list<Preset::Type>{Preset::TYPE_PRINTER, Preset::TYPE_PRINT, Preset::TYPE_FILAMENT} :
|
const auto list = m_pr_technology == ptFFF ? std::initializer_list<Preset::Type>{Preset::TYPE_PRINTER, Preset::TYPE_PRINT, Preset::TYPE_FILAMENT} :
|
||||||
std::initializer_list<Preset::Type>{Preset::TYPE_PRINTER, Preset::TYPE_SLA_PRINT, Preset::TYPE_SLA_MATERIAL })
|
std::initializer_list<Preset::Type>{ Preset::TYPE_PRINTER, Preset::TYPE_SLA_PRINT, Preset::TYPE_SLA_MATERIAL };
|
||||||
|
|
||||||
|
for (const Preset::Type& type : list) {
|
||||||
if (!m_tree->options(type, true).empty()) {
|
if (!m_tree->options(type, true).empty()) {
|
||||||
types_for_save.emplace_back(type);
|
types_for_save.emplace_back(type);
|
||||||
presets_to_save.emplace_back(PresetToSave{ type, get_left_preset_name(type), get_right_preset_name(type), get_right_preset_name(type) });
|
presets_to_save.emplace_back(PresetToSave{ type, get_left_preset_name(type), get_right_preset_name(type), get_right_preset_name(type) });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!types_for_save.empty()) {
|
if (!types_for_save.empty()) {
|
||||||
SavePresetDialog save_dlg(this, types_for_save, _u8L("Modified"), m_preset_bundle_right.get());
|
SavePresetDialog save_dlg(this, types_for_save, _u8L("Modified"), m_preset_bundle_right.get());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user