Regression: Check on absolute value of xy_size_compensation instead of raw value > 0 to permit negative offsets again.

Fixes #4101
This commit is contained in:
Joseph Lenox 2017-09-02 23:01:43 -05:00
parent d6469b284a
commit c84bc71361

View File

@ -742,7 +742,7 @@ void PrintObject::_slice()
// Apply size compensation and perform clipping of multi-part objects. // Apply size compensation and perform clipping of multi-part objects.
const coord_t xy_size_compensation = scale_(this->config.xy_size_compensation.value); const coord_t xy_size_compensation = scale_(this->config.xy_size_compensation.value);
for (Layer* layer : this->layers) { for (Layer* layer : this->layers) {
if (xy_size_compensation > 0) { if (abs(xy_size_compensation) > 0) {
if (layer->regions.size() == 1) { if (layer->regions.size() == 1) {
// Single region, growing or shrinking. // Single region, growing or shrinking.
LayerRegion* layerm = layer->regions.front(); LayerRegion* layerm = layer->regions.front();
@ -758,7 +758,7 @@ void PrintObject::_slice()
LayerRegion* layerm = layer->regions[region_id]; LayerRegion* layerm = layer->regions[region_id];
Polygons slices = layerm->slices; Polygons slices = layerm->slices;
if (xy_size_compensation > 0) if (abs(xy_size_compensation) > 0)
slices = offset(slices, xy_size_compensation); slices = offset(slices, xy_size_compensation);
if (region_id > 0) if (region_id > 0)