mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fixed update of "Cost" field in "Sliced Info" box after a change of any material's options
("bottle_cost", "bottle_volume", "bottle_weight", "material_density")
This commit is contained in:
parent
3e0690b37b
commit
3d4cda8ace
2 changed files with 6 additions and 8 deletions
|
@ -3448,7 +3448,7 @@ void TabSLAMaterial::build()
|
|||
new_conf.set_key_value("bottle_weight", new ConfigOptionFloat(new_bottle_weight));
|
||||
}
|
||||
if (opt_key == "bottle_weight") {
|
||||
double new_bottle_volume = boost::any_cast<double>(value)/(new_conf.option("material_density")->getFloat() * 1000);
|
||||
double new_bottle_volume = boost::any_cast<double>(value)/new_conf.option("material_density")->getFloat() * 1000;
|
||||
new_conf.set_key_value("bottle_volume", new ConfigOptionFloat(new_bottle_volume));
|
||||
}
|
||||
if (opt_key == "material_density") {
|
||||
|
@ -3459,12 +3459,10 @@ void TabSLAMaterial::build()
|
|||
load_config(new_conf);
|
||||
|
||||
update_dirty();
|
||||
on_value_change(opt_key, value);
|
||||
|
||||
if (opt_key == "bottle_volume" || opt_key == "bottle_cost") {
|
||||
wxGetApp().sidebar().update_sliced_info_sizer();
|
||||
wxGetApp().sidebar().Layout();
|
||||
}
|
||||
// Change of any from those options influences for an update of "Sliced Info"
|
||||
wxGetApp().sidebar().update_sliced_info_sizer();
|
||||
wxGetApp().sidebar().Layout();
|
||||
};
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Layers")));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue