summaryrefslogtreecommitdiffstats
path: root/Project/Load.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-10-29 17:46:00 -0200
committerThales1330 <thaleslima.ufu@gmail.com>2016-10-29 17:46:00 -0200
commit7d4df7195202eaea0e84f227e96f19dec4144081 (patch)
tree894064c78359c2eca33b344353dbf290ba4df9a3 /Project/Load.cpp
parent468ba7581675a23567746628d6777ca411b150d3 (diff)
downloadPSP.git-7d4df7195202eaea0e84f227e96f19dec4144081.tar.gz
PSP.git-7d4df7195202eaea0e84f227e96f19dec4144081.tar.xz
PSP.git-7d4df7195202eaea0e84f227e96f19dec4144081.zip
Power flow arrows implemented
Diffstat (limited to 'Project/Load.cpp')
-rw-r--r--Project/Load.cpp4
1 files changed, 4 insertions, 0 deletions
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<wxPoint2DDouble> 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)