From d93ef357da510f2515556ff2cb51688a4e068805 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Mon, 5 Sep 2016 18:43:50 -0300 Subject: All elements implemented, switches implemented --- Project/Shunt.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Project/Shunt.cpp') 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(); } } -- cgit