Transformable::Transformable(const Transformable& other) { // We can only copy the layouts when they are strings Layout2d position = {other.getPosition()}; Layout2d size = {other.getSize()}; if (other.m_position.x.getImpl()->operation == LayoutImpl::Operation::String) position.x = other.m_position.x.getImpl()->stringExpression; if (other.m_position.y.getImpl()->operation == LayoutImpl::Operation::String) position.y = other.m_position.y.getImpl()->stringExpression; if (other.m_size.x.getImpl()->operation == LayoutImpl::Operation::String) size.x = other.m_size.x.getImpl()->stringExpression; if (other.m_size.y.getImpl()->operation == LayoutImpl::Operation::String) size.y = other.m_size.y.getImpl()->stringExpression; setPosition(position); setSize(size); }