diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2017-01-06 20:49:28 -0200 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2017-01-06 20:49:28 -0200 |
commit | 2cd589742c6a4fd289d2f0696d844ccf18b917cb (patch) | |
tree | 42a64542d07a4997be5e216ffd54a27e39f76b56 /Project/Transformer.cpp | |
parent | 6a268dba6da88e0a371ce6358e4f43b0c3d08d7d (diff) | |
download | PSP.git-2cd589742c6a4fd289d2f0696d844ccf18b917cb.tar.gz PSP.git-2cd589742c6a4fd289d2f0696d844ccf18b917cb.tar.xz PSP.git-2cd589742c6a4fd289d2f0696d844ccf18b917cb.zip |
Several bugfixes on power elements
Diffstat (limited to 'Project/Transformer.cpp')
-rw-r--r-- | Project/Transformer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Project/Transformer.cpp b/Project/Transformer.cpp index 7db7813..3d3156a 100644 --- a/Project/Transformer.cpp +++ b/Project/Transformer.cpp @@ -56,11 +56,11 @@ bool Transformer::AddParent(Element* parent, wxPoint2DDouble position) // Set the transformer rectangle. m_width = 70.0; m_height = 40.0; - m_rect = wxRect2DDouble(m_position.m_x - m_width / 2.0, m_position.m_y - m_height / 2.0, m_width, m_height); + SetPosition(m_position); // This method calculates the rectangle propely. // Set the "side" points. - m_pointList.push_back(wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(-10, m_height / 2.0))); + m_pointList.push_back(wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(-10 - m_borderSize, m_height / 2.0))); m_pointList.push_back( - wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(m_width + 10, m_height / 2.0))); + wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(m_width + 10 + m_borderSize, m_height / 2.0))); // Set first switch point. wxPoint2DDouble secondPoint = parentPt; |