mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-22 08:22:58 +00:00
Update translations. Code dedup and cleanup
This commit is contained in:
@@ -322,7 +322,9 @@ void OptionsSearcher::init(std::vector<InputInfo> input_values)
|
||||
|
||||
void OptionsSearcher::apply(DynamicPrintConfig *config, Preset::Type type, ConfigOptionMode mode)
|
||||
{
|
||||
if (options.empty()) return;
|
||||
// options_all_modes is a separate consumer (the Speed Dial), so "nothing initialised yet" means
|
||||
// both views are empty - the mode-filtered options can be empty while the all-modes view is not.
|
||||
if (options.empty() && options_all_modes.empty()) return;
|
||||
|
||||
options.erase(std::remove_if(options.begin(), options.end(), [type](Option opt) { return opt.type == type; }), options.end());
|
||||
options_all_modes.erase(std::remove_if(options_all_modes.begin(), options_all_modes.end(), [type](Option opt) { return opt.type == type; }),
|
||||
|
||||
Reference in New Issue
Block a user