Changed default values.

And bottle_volume is preferred to recalculation instead of bottle_weight
This commit is contained in:
YuSanka 2019-09-27 12:08:08 +02:00
parent 82bc243281
commit c370fccd8b
2 changed files with 4 additions and 4 deletions

View file

@ -3417,8 +3417,8 @@ void TabSLAMaterial::build()
new_conf.set_key_value("bottle_volume", new ConfigOptionFloat(new_bottle_volume));
}
if (opt_key == "material_density") {
double new_bottle_weight = new_conf.option("bottle_volume")->getFloat() * boost::any_cast<double>(value) / 1000;
new_conf.set_key_value("bottle_weight", new ConfigOptionFloat(new_bottle_weight));
double new_bottle_volume = new_conf.option("bottle_weight")->getFloat() * boost::any_cast<double>(value) * 1000;
new_conf.set_key_value("bottle_volume", new ConfigOptionFloat(new_bottle_volume));
}
load_config(new_conf);