mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-22 12:45:17 +00:00
Fix flush_multiplier type mismatch: use ConfigOptionFloats instead of ConfigOptionFloat (#13062)
This commit is contained in:
@@ -9029,11 +9029,8 @@ void DynamicPrintConfig::update_values_to_printer_extruders(DynamicPrintConfig&
|
|||||||
//variant index
|
//variant index
|
||||||
variant_index[e_index] = get_index_for_extruder(e_index+1, id_name, extruder_type, nozzle_volume_type, variant_name);
|
variant_index[e_index] = get_index_for_extruder(e_index+1, id_name, extruder_type, nozzle_volume_type, variant_name);
|
||||||
if (variant_index[e_index] < 0) {
|
if (variant_index[e_index] < 0) {
|
||||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(", Line %1%: could not found extruder_type %2%, nozzle_volume_type %3%, extruder_index %4%")
|
// Orca: This is expected during transient UI states (e.g. popup windows),
|
||||||
%__LINE__ %s_keys_names_ExtruderType[extruder_type] % s_keys_names_NozzleVolumeType[nozzle_volume_type] % (e_index+1);
|
// fall back to 0 silently.
|
||||||
assert(false);
|
|
||||||
//for some updates happens in a invalid state(caused by popup window)
|
|
||||||
//we need to avoid crash
|
|
||||||
variant_index[e_index] = 0;
|
variant_index[e_index] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4050,8 +4050,8 @@ void Sidebar::auto_calc_flushing_volumes_internal(const int modify_id, const int
|
|||||||
|
|
||||||
const std::vector<int>& min_flush_volumes = get_min_flush_volumes(full_config, extruder_id);
|
const std::vector<int>& min_flush_volumes = get_min_flush_volumes(full_config, extruder_id);
|
||||||
|
|
||||||
ConfigOptionFloat* flush_multi_opt = project_config.option<ConfigOptionFloat>("flush_multiplier");
|
const auto* flush_multi_opt = project_config.option<ConfigOptionFloats>("flush_multiplier");
|
||||||
float flush_multiplier = flush_multi_opt ? flush_multi_opt->getFloat() : 1.f;
|
float flush_multiplier = flush_multi_opt ? (float)flush_multi_opt->get_at(extruder_id) : 1.f;
|
||||||
std::vector<double> matrix = init_matrix;
|
std::vector<double> matrix = init_matrix;
|
||||||
int m_max_flush_volume = Slic3r::g_max_flush_volume;
|
int m_max_flush_volume = Slic3r::g_max_flush_volume;
|
||||||
unsigned int m_number_of_extruders = (int)(sqrt(init_matrix.size()) + 0.001);
|
unsigned int m_number_of_extruders = (int)(sqrt(init_matrix.size()) + 0.001);
|
||||||
|
|||||||
Reference in New Issue
Block a user