From 7d4df7195202eaea0e84f227e96f19dec4144081 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Sat, 29 Oct 2016 17:46:00 -0200 Subject: Power flow arrows implemented --- Project/Load.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Project/Load.cpp') diff --git a/Project/Load.cpp b/Project/Load.cpp index 25793b1..ec2297b 100644 --- a/Project/Load.cpp +++ b/Project/Load.cpp @@ -30,6 +30,8 @@ bool Load::AddParent(Element* parent, wxPoint2DDouble position) wxRect2DDouble genRect(0, 0, 0, 0); m_switchRect.push_back(genRect); // Push a general rectangle. UpdateSwitches(); + m_pfDirection = PF_TO_ELEMENT; + UpdatePowerFlowArrowsPosition(); return true; } @@ -73,6 +75,7 @@ void Load::Draw(wxPoint2DDouble translation, double scale) const DrawLine(m_pointList); DrawSwitches(); + DrawPowerFlowPts(); std::vector triangPts; for(int i = 0; i < 3; i++) { @@ -97,6 +100,7 @@ void Load::Rotate(bool clockwise) m_pointList[2] = RotateAtPosition(m_pointList[2], rotAngle); m_pointList[3] = RotateAtPosition(m_pointList[3], rotAngle); UpdateSwitchesPosition(); + UpdatePowerFlowArrowsPosition(); } bool Load::GetContextMenu(wxMenu& menu) -- cgit