UnsavedChangesDialog: Fixed a crash, when enum_labels wasn't defined for some enum config option.
This commit is contained in:
parent
30dc2bf39c
commit
9585fda2f1
1 changed files with 1 additions and 1 deletions
|
@ -1030,7 +1030,7 @@ bool UnsavedChangesDialog::save(PresetCollection* dependent_presets, bool show_s
|
|||
wxString get_string_from_enum(const std::string& opt_key, const DynamicPrintConfig& config, bool is_infill = false)
|
||||
{
|
||||
const ConfigOptionDef& def = config.def()->options.at(opt_key);
|
||||
const std::vector<std::string>& names = def.enum_labels;//ConfigOptionEnum<T>::get_enum_names();
|
||||
const std::vector<std::string>& names = def.enum_labels.empty() ? def.enum_values : def.enum_labels;
|
||||
int val = config.option(opt_key)->getInt();
|
||||
|
||||
// Each infill doesn't use all list of infill declared in PrintConfig.hpp.
|
||||
|
|
Loading…
Reference in a new issue