diff options
author | YuSanka <yusanka@gmail.com> | 2020-03-09 18:20:50 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2020-03-09 19:01:05 +0300 |
commit | 3d3e36ba8d22d3654fb6adb451dae9f0eb6cf818 (patch) | |
tree | d33662cf455484bbeae81ae00142d5e97921a370 /src/slic3r/GUI/Tab.cpp | |
parent | e83fb4582c1de8477fd10d8675e3b0a1e5ef9767 (diff) |
Added "Filament spool weight" option to filament options
Diffstat (limited to 'src/slic3r/GUI/Tab.cpp')
-rw-r--r-- | src/slic3r/GUI/Tab.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 9a6313e70..d8358af56 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1100,6 +1100,12 @@ void Tab::update_frequently_changed_parameters() } } +void Tab::update_sliced_info_on_plater() +{ + wxGetApp().sidebar().update_sliced_info_sizer(); + wxGetApp().sidebar().Layout(); +} + void TabPrint::build() { m_presets = &m_preset_bundle->prints; @@ -1484,6 +1490,19 @@ void TabFilament::build() optgroup->append_single_option_line("extrusion_multiplier"); optgroup->append_single_option_line("filament_density"); optgroup->append_single_option_line("filament_cost"); + optgroup->append_single_option_line("filament_spool_weight"); + + optgroup->m_on_change = [this, optgroup](t_config_option_key opt_key, boost::any value) + { + update_dirty(); + + if (opt_key== "filament_spool_weight") + // Change of this option only has an influence to an update of "Sliced Info" + update_sliced_info_on_plater(); + else + // update configuration for its check and to schedule a background process, if needed + update(); + }; optgroup = page->new_optgroup(_(L("Temperature")) + wxString(" °C", wxConvUTF8)); Line line = { _(L("Extruder")), "" }; @@ -3567,8 +3586,7 @@ void TabSLAMaterial::build() update_dirty(); // Change of any from those options influences for an update of "Sliced Info" - wxGetApp().sidebar().update_sliced_info_sizer(); - wxGetApp().sidebar().Layout(); + update_sliced_info_on_plater(); }; optgroup = page->new_optgroup(_(L("Layers"))); |