FIX: [#4320] crash when edit project preset

github: #4320

Change-Id: I81eb5f0d461565d63a32100a5bebb4569cfb0b1b
This commit is contained in:
maosheng.wei 2024-06-20 16:10:07 +08:00 committed by Lane.Wei
parent 75e010e328
commit b6805df25b
2 changed files with 2 additions and 2 deletions

View File

@ -4787,7 +4787,7 @@ void CreatePresetForPrinterDialog::get_visible_printer_and_compatible_filament_p
m_preset_bundle->update_compatible(PresetSelectCompatibleType::Always);
const std::deque<Preset> &filament_presets = m_preset_bundle->filaments.get_presets();
for (const Preset &filament_preset : filament_presets) {
if (filament_preset.is_default || !filament_preset.is_compatible) continue;
if (filament_preset.is_default || !filament_preset.is_compatible || filament_preset.is_project_embedded) continue;
ConfigOptionStrings *filament_types;
const Preset * filament_preset_base = m_preset_bundle->filaments.get_preset_base(filament_preset);
if (filament_preset_base == &filament_preset) {

View File

@ -57,7 +57,7 @@ static wxString update_custom_filaments()
bool not_need_show = false;
std::string filament_name;
for (const Preset *preset : filament_id_to_presets.second) {
if (preset->is_system) {
if (preset->is_system || preset->is_project_embedded) {
not_need_show = true;
break;
}