summaryrefslogtreecommitdiffstats
path: root/Project/Shunt.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-09-05 18:43:50 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2016-09-05 18:43:50 -0300
commitd93ef357da510f2515556ff2cb51688a4e068805 (patch)
treeda24ff514d5d507252681365d7cda6b08576af23 /Project/Shunt.cpp
parent47cebfc84d4ae315f4bf8ffb3d074b2b75781a1b (diff)
downloadPSP.git-d93ef357da510f2515556ff2cb51688a4e068805.tar.gz
PSP.git-d93ef357da510f2515556ff2cb51688a4e068805.tar.xz
PSP.git-d93ef357da510f2515556ff2cb51688a4e068805.zip
All elements implemented, switches implemented
Diffstat (limited to 'Project/Shunt.cpp')
-rw-r--r--Project/Shunt.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Project/Shunt.cpp b/Project/Shunt.cpp
index 34e4068..81a310d 100644
--- a/Project/Shunt.cpp
+++ b/Project/Shunt.cpp
@@ -17,6 +17,7 @@ void Shunt::UpdateSwitchesPosition()
{
m_pointList[1] = m_pointList[0];
}
+ UpdateSwitches();
}
void Shunt::Move(wxPoint2DDouble position)
@@ -43,6 +44,7 @@ void Shunt::MoveNode(Element* element, wxPoint2DDouble position)
if(m_activeNodeID == 1) {
m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
m_parentList[0] = NULL;
+ m_online = false;
}
}
@@ -61,6 +63,7 @@ void Shunt::RemoveParent(Element* parent)
{
if(parent == m_parentList[0]) {
m_parentList[0] = NULL;
+ m_online = false;
UpdateSwitchesPosition();
}
}
@@ -101,6 +104,7 @@ bool Shunt::SetNodeParent(Element* parent)
else
{
m_parentList[0] = NULL;
+ m_online = false;
}
}
return false;
@@ -114,6 +118,7 @@ void Shunt::UpdateNodes()
if(!m_parentList[0]->Intersects(nodeRect)) {
m_parentList[0] = NULL;
+ m_online = false;
UpdateSwitchesPosition();
}
}