Skip to content
Snippets Groups Projects
Commit 0b1d030e authored by Joseph Boudreau's avatar Joseph Boudreau
Browse files

Fix a problem with squashing of multiple GeoShapeShifts, in which the original...

Fix a problem with squashing of multiple GeoShapeShifts, in which the original shape disappears from memory in the second operation
parent 5262cef7
No related branches found
No related tags found
1 merge request!250Fix a problem with squashing of multiple GeoShapeShifts, in which the original...
Pipeline #6744107 passed
...@@ -14,7 +14,7 @@ GeoShapeShift::GeoShapeShift (const GeoShape* A, const GeoTrf::Transform3D &X): ...@@ -14,7 +14,7 @@ GeoShapeShift::GeoShapeShift (const GeoShape* A, const GeoTrf::Transform3D &X):
m_op{A}, m_shift{X} { m_op{A}, m_shift{X} {
/// Check whether the given shape also a shape shift. If so then we can simply /// Check whether the given shape also a shape shift. If so then we can simply
/// take the operand of the sub shift and summarize the transformations of the two into one /// take the operand of the sub shift and summarize the transformations of the two into one
if (getOp()->typeID() == typeID()) { if (A->refCount() > 1 && getOp()->typeID() == typeID()) {
const GeoShapeShift* subShift{static_cast<const GeoShapeShift*>(getOp())}; const GeoShapeShift* subShift{static_cast<const GeoShapeShift*>(getOp())};
m_shift = subShift->getX() * getX(); m_shift = subShift->getX() * getX();
m_op.reset(subShift->getOp()); m_op.reset(subShift->getOp());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment