When loading a config bundle, make sure a config value is not accepted

if it is placed in a wrong group (for example, max_print_height
does not belong to print settings, but a printer settings, so Slic3r
will now complain about it being in print settings, and it will
remove the value from the print settings).
This commit is contained in:
bubnikv 2018-05-22 14:17:27 +02:00
parent 6ea81279ff
commit e8247c5646
2 changed files with 38 additions and 15 deletions

View file

@ -244,6 +244,7 @@ public:
const std::string& get_suffix_modified();
// Return a preset possibly with modifications.
Preset& default_preset() { return m_presets.front(); }
const Preset& default_preset() const { return m_presets.front(); }
// Return a preset by an index. If the preset is active, a temporary copy is returned.
Preset& preset(size_t idx) { return (int(idx) == m_idx_selected) ? m_edited_preset : m_presets[idx]; }