Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2020-01-08 17:23:46 +0300
committerYuSanka <yusanka@gmail.com>2020-01-08 17:27:09 +0300
commit3d4cda8ace890fcd0cc63951d7b0274dab50662f (patch)
tree88f6be6549a89f2954ea7239c8f58b09aaa9eb87 /src/slic3r/GUI/Tab.cpp
parent3e0690b37bff4af00015a3b393c39a129ab0d1cc (diff)
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")
Diffstat (limited to 'src/slic3r/GUI/Tab.cpp')
-rw-r--r--src/slic3r/GUI/Tab.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index 353e822e3..c518ede80 100644
--- a/src/slic3r/GUI/Tab.cpp
+++ b/src/slic3r/GUI/Tab.cpp
@@ -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")));