FIX: [#4320] crash when edit project preset
github: #4320 Change-Id: I81eb5f0d461565d63a32100a5bebb4569cfb0b1b
This commit is contained in:
parent
75e010e328
commit
b6805df25b
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue