mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-15 01:22:07 +00:00
#5236 - Fixed color not correctly shown after slice
The bug was introduced with 148f4fe766 which is now replaced by this commit
This commit is contained in:
@@ -598,9 +598,6 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
||||
}
|
||||
}
|
||||
|
||||
// ensure at least one (default) color is defined
|
||||
std::string default_color = "#FF8000";
|
||||
m_result.extruder_colors = std::vector<std::string>(1, default_color);
|
||||
const ConfigOptionStrings* extruder_colour = config.option<ConfigOptionStrings>("extruder_colour");
|
||||
if (extruder_colour != nullptr) {
|
||||
// takes colors from config
|
||||
@@ -615,7 +612,9 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// replace missing values with default
|
||||
std::string default_color = "#FF8000";
|
||||
for (size_t i = 0; i < m_result.extruder_colors.size(); ++i) {
|
||||
if (m_result.extruder_colors[i].empty())
|
||||
m_result.extruder_colors[i] = default_color;
|
||||
@@ -837,10 +836,6 @@ void GCodeProcessor::process_file(const std::string& filename, bool apply_postpr
|
||||
|
||||
update_estimated_times_stats();
|
||||
|
||||
// ensure at least one (default) color is defined
|
||||
if (m_result.extruder_colors.empty())
|
||||
m_result.extruder_colors.push_back("#FF8000");
|
||||
|
||||
// post-process to add M73 lines into the gcode
|
||||
if (apply_postprocess)
|
||||
m_time_processor.post_process(filename);
|
||||
|
||||
Reference in New Issue
Block a user