summaryrefslogtreecommitdiffstats
path: root/Project/Shunt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project/Shunt.cpp')
-rw-r--r--Project/Shunt.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Project/Shunt.cpp b/Project/Shunt.cpp
index 81a310d..7df5330 100644
--- a/Project/Shunt.cpp
+++ b/Project/Shunt.cpp
@@ -124,10 +124,13 @@ void Shunt::UpdateNodes()
}
}
-void Shunt::RotateNode(Element* parent)
+void Shunt::RotateNode(Element* parent, bool clockwise)
{
+ double rotAngle = m_rotationAngle;
+ if(!clockwise) rotAngle = -m_rotationAngle;
+
if(parent == m_parentList[0]) {
- m_pointList[0] = parent->RotateAtPosition(m_pointList[0], m_rotationAngle);
+ m_pointList[0] = parent->RotateAtPosition(m_pointList[0], rotAngle);
UpdateSwitchesPosition();
}
}