mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-06 08:26:04 +08:00
ENH: remove the dulicate warning msg of temp
Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I978f2de34e277c6747adc783cb91c341f159a67e
This commit is contained in:
parent
8df60acc61
commit
eae71a5184
@ -3983,18 +3983,21 @@ void GCodeProcessor::update_slice_warnings()
|
||||
|
||||
auto used_extruders = get_used_extruders();
|
||||
assert(!used_extruders.empty());
|
||||
GCodeProcessorResult::SliceWarning warning;
|
||||
warning.level = 1;
|
||||
if (m_highest_bed_temp != 0) {
|
||||
for (size_t i = 0; i < used_extruders.size(); i++) {
|
||||
int temperature = get_filament_vitrification_temperature(used_extruders[i]);
|
||||
if (temperature != 0 && m_highest_bed_temp > temperature) {
|
||||
GCodeProcessorResult::SliceWarning warning;
|
||||
warning.level = 1;
|
||||
warning.msg = BED_TEMP_TOO_HIGH_THAN_FILAMENT;
|
||||
m_result.warnings.emplace_back(std::move(warning));
|
||||
}
|
||||
if (temperature != 0 && m_highest_bed_temp > temperature)
|
||||
warning.params.push_back(std::to_string(used_extruders[i]));
|
||||
}
|
||||
}
|
||||
|
||||
if (!warning.params.empty()) {
|
||||
warning.msg = BED_TEMP_TOO_HIGH_THAN_FILAMENT;
|
||||
m_result.warnings.push_back(warning);
|
||||
}
|
||||
|
||||
m_result.warnings.shrink_to_fit();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user