Skip to content

Commit

Permalink
Fix access violation when slicing project with print-by-object mode (#…
Browse files Browse the repository at this point in the history
…5984)

Fix issue that models with only one color become multicolor after slicing when print-by-object mode is used.
This applys the same fix as 612204b
  • Loading branch information
Noisyfox authored Jul 30, 2024
1 parent b5bf6ae commit 783570e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/libslic3r/GCode/ToolOrdering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,14 @@ ToolOrdering::ToolOrdering(const PrintObject &object, unsigned int first_extrude

// BBS
// Reorder the extruders to minimize tool switches.
if (first_extruder == (unsigned int)-1) {
this->reorder_extruders(generate_first_layer_tool_order(object));
std::vector<unsigned int> first_layer_tool_order;
if (first_extruder == (unsigned int) -1) {
first_layer_tool_order = generate_first_layer_tool_order(object);
}
else {

if (!first_layer_tool_order.empty()) {
this->reorder_extruders(first_layer_tool_order);
} else {
this->reorder_extruders(first_extruder);
}

Expand Down

0 comments on commit 783570e

Please sign in to comment.