mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Fix filament override checkbox not update after click (#11517)
* Fix filament override checkbox not update after click * Event args should be references otherwise `e.skip()` won't work * Fix bool option override
This commit is contained in:
@@ -108,7 +108,12 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
|
||||
try{
|
||||
|
||||
if (config.def()->get(opt_key)->type == coBools && config.def()->get(opt_key)->nullable) {
|
||||
auto vec_new = std::make_unique<ConfigOptionBoolsNullable>(1, boost::any_cast<unsigned char>(value) );
|
||||
const auto v = boost::any_cast<unsigned char>(value);
|
||||
auto vec_new = std::make_unique<ConfigOptionBoolsNullable>(1, v);
|
||||
if (v == ConfigOptionBoolsNullable::nil_value()) {
|
||||
vec_new->set_at_to_nil(0);
|
||||
}
|
||||
|
||||
config.option<ConfigOptionBoolsNullable>(opt_key)->set_at(vec_new.get(), opt_index, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user