diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2018-04-09 17:59:49 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2018-04-09 17:59:49 -0300 |
commit | 586ff94d4bffcaf256e4ca7150b926c1babecada (patch) | |
tree | 671e6b6484d8dd3805500aba65b45469432ea2bf /Project/ConnectionLine.cpp | |
parent | 4e1e884a21a767f13278e32463b5417569db3534 (diff) | |
download | PSP.git-586ff94d4bffcaf256e4ca7150b926c1babecada.tar.gz PSP.git-586ff94d4bffcaf256e4ca7150b926c1babecada.tar.xz PSP.git-586ff94d4bffcaf256e4ca7150b926c1babecada.zip |
More bugfixes
Diffstat (limited to 'Project/ConnectionLine.cpp')
-rw-r--r-- | Project/ConnectionLine.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Project/ConnectionLine.cpp b/Project/ConnectionLine.cpp index 672c6e8..80752da 100644 --- a/Project/ConnectionLine.cpp +++ b/Project/ConnectionLine.cpp @@ -22,9 +22,7 @@ ConnectionLine::ConnectionLine(Node* firstNode, int id) : ControlElement(id) { wxPoint2DDouble pt = firstNode->GetPosition(); m_tmpSndPt = pt; - for(int i = 0; i < 6; i++) { - m_pointList.push_back(pt); - } + for(int i = 0; i < 6; i++) { m_pointList.push_back(pt); } m_nodeList.push_back(firstNode); firstNode->SetConnected(); } @@ -52,9 +50,7 @@ void ConnectionLine::Draw(wxPoint2DDouble translation, double scale) const bool ConnectionLine::Contains(wxPoint2DDouble position) const { - if(PointToLineDistance(position) < 5.0) { - return true; - } + if(PointToLineDistance(position) < 5.0) { return true; } return false; } @@ -202,3 +198,11 @@ Element* ConnectionLine::GetCopy() *copy = *this; return copy; } + +bool ConnectionLine::Initialize() +{ + m_solved = false; + m_output = 0.0; + m_value = 0.0; + return true; +} |