Fixed crash when checking an integer nullable param on a config tab

This commit is contained in:
tamasmeszaros 2023-12-12 16:42:13 +01:00 committed by YuSanka
parent e8214901d4
commit 3160b00d5a
4 changed files with 10 additions and 30 deletions

View File

@ -1125,6 +1125,12 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloatNullable, material_ow_branchingsupport_head_penetration)) ((ConfigOptionFloatNullable, material_ow_branchingsupport_head_penetration))
((ConfigOptionFloatNullable, material_ow_support_head_width)) ((ConfigOptionFloatNullable, material_ow_support_head_width))
((ConfigOptionFloatNullable, material_ow_branchingsupport_head_width)) ((ConfigOptionFloatNullable, material_ow_branchingsupport_head_width))
((ConfigOptionIntNullable, material_ow_support_points_density_relative))
((ConfigOptionFloatNullable, material_ow_elefant_foot_compensation))
((ConfigOptionFloatNullable, material_ow_relative_correction_x))
((ConfigOptionFloatNullable, material_ow_relative_correction_y))
((ConfigOptionFloatNullable, material_ow_relative_correction_z))
) )
PRINT_CONFIG_CLASS_DEFINE( PRINT_CONFIG_CLASS_DEFINE(

View File

@ -861,7 +861,9 @@ bool SLAPrint::invalidate_state_by_config_options(const std::vector<t_config_opt
"material_ow_branchingsupport_head_width"sv, "material_ow_branchingsupport_head_width"sv,
"material_ow_elefant_foot_compensation"sv, "material_ow_elefant_foot_compensation"sv,
"material_ow_support_points_density_relative"sv, "material_ow_support_points_density_relative"sv,
"material_ow_relative_correction"sv "material_ow_relative_correction_x"sv,
"material_ow_relative_correction_y"sv,
"material_ow_relative_correction_z"sv
}; };
std::vector<SLAPrintStep> steps; std::vector<SLAPrintStep> steps;
@ -947,7 +949,6 @@ bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_conf
opt_key == "support_points_density_relative" opt_key == "support_points_density_relative"
|| opt_key == "support_enforcers_only" || opt_key == "support_enforcers_only"
|| opt_key == "support_points_minimal_distance" || opt_key == "support_points_minimal_distance"
// || opt_key == "material_ow_support_points_density_relative"
) { ) {
steps.emplace_back(slaposSupportPoints); steps.emplace_back(slaposSupportPoints);
} else if ( } else if (
@ -967,11 +968,6 @@ bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_conf
|| opt_key == "support_max_bridge_length" || opt_key == "support_max_bridge_length"
|| opt_key == "support_max_pillar_link_distance" || opt_key == "support_max_pillar_link_distance"
|| opt_key == "support_base_safety_distance" || opt_key == "support_base_safety_distance"
// || opt_key == "material_ow_support_pillar_diameter"
// || opt_key == "material_ow_support_head_front_diameter"
// || opt_key == "material_ow_support_head_penetration"
// || opt_key == "material_ow_support_head_width"
|| opt_key == "branchingsupport_head_front_diameter" || opt_key == "branchingsupport_head_front_diameter"
|| opt_key == "branchingsupport_head_penetration" || opt_key == "branchingsupport_head_penetration"
|| opt_key == "branchingsupport_head_width" || opt_key == "branchingsupport_head_width"
@ -988,11 +984,6 @@ bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_conf
|| opt_key == "branchingsupport_max_bridge_length" || opt_key == "branchingsupport_max_bridge_length"
|| opt_key == "branchingsupport_max_pillar_link_distance" || opt_key == "branchingsupport_max_pillar_link_distance"
|| opt_key == "branchingsupport_base_safety_distance" || opt_key == "branchingsupport_base_safety_distance"
// || opt_key == "material_ow_branchingsupport_pillar_diameter"
// || opt_key == "material_ow_branchingsupport_head_front_diameter"
// || opt_key == "material_ow_branchingsupport_head_penetration"
// || opt_key == "material_ow_branchingsupport_head_width"
|| opt_key == "pad_object_gap" || opt_key == "pad_object_gap"
) { ) {
steps.emplace_back(slaposSupportTree); steps.emplace_back(slaposSupportTree);

View File

@ -856,6 +856,7 @@ void SpinCtrl::BUILD() {
switch (m_opt.type) { switch (m_opt.type) {
case coInt: case coInt:
default_value = m_opt.default_value->getInt(); default_value = m_opt.default_value->getInt();
m_last_meaningful_value = default_value;
break; break;
case coInts: case coInts:
{ {

View File

@ -5623,24 +5623,6 @@ void TabSLAMaterial::update_material_overrides_page()
for (const std::string& key : keys) { for (const std::string& key : keys) {
update_line_with_near_label_widget(*optgroup, key); update_line_with_near_label_widget(*optgroup, key);
// // update_line_with_near_label_widget(*optgroup, key, false);
// const static std::string preprefix = "material_ow_";
// if (title == "Support head" || title == "Support pillar") {
// for (auto& prefix : { "", "branching" }) {
// update_line_with_near_label_widget(*optgroup, preprefix + prefix + key);
// }
// }
// else if (key == "relative_correction") {
// for (auto& axis : { "x", "y", "z" }) {
// update_line_with_near_label_widget(*optgroup, preprefix + key + "_" + char(axis[0]));
// }
// }
// else {
// update_line_with_near_label_widget(*optgroup, preprefix + key);
// }
} }
} }
} }