Skip to content
Snippets Groups Projects
Commit fb195d86 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'AnotherCollapseFix' into 'main'

Another collapse fix

See merge request !257
parents c1bf2880 eaba55ad
No related branches found
No related tags found
1 merge request!257Another collapse fix
Pipeline #6797219 passed with warnings
......@@ -14,9 +14,10 @@ GeoShapeShift::GeoShapeShift (const GeoShape* A, const GeoTrf::Transform3D &X):
m_op{A}, m_shift{X} {
/// 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
if (A->refCount() > 1 && getOp()->typeID() == typeID()) {
const GeoShapeShift* subShift{static_cast<const GeoShapeShift*>(getOp())};
m_shift = subShift->getX() * getX();
if (A->refCount() > 1 && A->typeID() == typeID()) {
const GeoShapeShift* subShift{dynamic_cast<const GeoShapeShift*>(A)};
GeoTrf::Transform3D updatedShift = m_shift * subShift->getX();
m_shift = std::move(updatedShift);
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