- if (m_constraints)
- {
- UnsetConstraints(m_constraints);
- delete m_constraints;
- }
- m_constraints = c;
- if (m_constraints)
- {
- // Make sure other windows know they're part of a 'meaningful relationship'
- if (m_constraints->left.GetOtherWindow() && (m_constraints->left.GetOtherWindow() != this))
- m_constraints->left.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
- if (m_constraints->top.GetOtherWindow() && (m_constraints->top.GetOtherWindow() != this))
- m_constraints->top.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
- if (m_constraints->right.GetOtherWindow() && (m_constraints->right.GetOtherWindow() != this))
- m_constraints->right.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
- if (m_constraints->bottom.GetOtherWindow() && (m_constraints->bottom.GetOtherWindow() != this))
- m_constraints->bottom.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
- if (m_constraints->width.GetOtherWindow() && (m_constraints->width.GetOtherWindow() != this))
- m_constraints->width.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
- if (m_constraints->height.GetOtherWindow() && (m_constraints->height.GetOtherWindow() != this))
- m_constraints->height.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
- if (m_constraints->centreX.GetOtherWindow() && (m_constraints->centreX.GetOtherWindow() != this))
- m_constraints->centreX.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
- if (m_constraints->centreY.GetOtherWindow() && (m_constraints->centreY.GetOtherWindow() != this))
- m_constraints->centreY.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
- }
+ if (m_constraints)
+ {
+ UnsetConstraints(m_constraints);
+ delete m_constraints;
+ }
+ m_constraints = c;
+ if (m_constraints)
+ {
+ // Make sure other windows know they're part of a 'meaningful relationship'
+ if (m_constraints->left.GetOtherWindow() && (m_constraints->left.GetOtherWindow() != this))
+ m_constraints->left.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
+ if (m_constraints->top.GetOtherWindow() && (m_constraints->top.GetOtherWindow() != this))
+ m_constraints->top.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
+ if (m_constraints->right.GetOtherWindow() && (m_constraints->right.GetOtherWindow() != this))
+ m_constraints->right.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
+ if (m_constraints->bottom.GetOtherWindow() && (m_constraints->bottom.GetOtherWindow() != this))
+ m_constraints->bottom.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
+ if (m_constraints->width.GetOtherWindow() && (m_constraints->width.GetOtherWindow() != this))
+ m_constraints->width.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
+ if (m_constraints->height.GetOtherWindow() && (m_constraints->height.GetOtherWindow() != this))
+ m_constraints->height.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
+ if (m_constraints->centreX.GetOtherWindow() && (m_constraints->centreX.GetOtherWindow() != this))
+ m_constraints->centreX.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
+ if (m_constraints->centreY.GetOtherWindow() && (m_constraints->centreY.GetOtherWindow() != this))
+ m_constraints->centreY.GetOtherWindow()->AddConstraintReference((wxWindow *)this);
+ }