mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Fix for issue #2765, arrange crash with custom beds
This commit is contained in:
@@ -492,8 +492,11 @@ BedShapeHint::BedShapeHint(const Polyline &bed) {
|
|||||||
m_type = BedShapes::bsCircle;
|
m_type = BedShapes::bsCircle;
|
||||||
m_bed.circ = c;
|
m_bed.circ = c;
|
||||||
} else {
|
} else {
|
||||||
|
if (m_type == BedShapes::bsIrregular)
|
||||||
|
m_bed.polygon.Slic3r::Polyline::~Polyline();
|
||||||
|
|
||||||
m_type = BedShapes::bsIrregular;
|
m_type = BedShapes::bsIrregular;
|
||||||
m_bed.polygon = bed;
|
::new (&m_bed.polygon) Polyline(bed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ class BedShapeHint {
|
|||||||
Polyline polygon;
|
Polyline polygon;
|
||||||
InfiniteBed infbed{};
|
InfiniteBed infbed{};
|
||||||
~BedShape_u() {}
|
~BedShape_u() {}
|
||||||
BedShape_u() {};
|
BedShape_u() {}
|
||||||
} m_bed;
|
} m_bed;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
BedShapeHint(){};
|
BedShapeHint(){}
|
||||||
|
|
||||||
/// Get a bed shape hint for arrange() from a naked Polyline.
|
/// Get a bed shape hint for arrange() from a naked Polyline.
|
||||||
explicit BedShapeHint(const Polyline &polyl);
|
explicit BedShapeHint(const Polyline &polyl);
|
||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (m_type == BedShapes::bsIrregular)
|
if (m_type == BedShapes::bsIrregular)
|
||||||
m_bed.polygon.Slic3r::Polyline::~Polyline();
|
m_bed.polygon.Slic3r::Polyline::~Polyline();
|
||||||
};
|
}
|
||||||
|
|
||||||
BedShapeHint(const BedShapeHint &cpy) { *this = cpy; }
|
BedShapeHint(const BedShapeHint &cpy) { *this = cpy; }
|
||||||
BedShapeHint(BedShapeHint &&cpy) { *this = std::move(cpy); }
|
BedShapeHint(BedShapeHint &&cpy) { *this = std::move(cpy); }
|
||||||
|
|||||||
Reference in New Issue
Block a user