diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-10-24 21:14:59 -0200 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-10-24 21:14:59 -0200 |
commit | 39a34b99185b3c046fb4427d07dd333575962e29 (patch) | |
tree | 6654d829e82410a6ab0525d2273aeb523f124523 /Project/Workspace.cpp | |
parent | 43f947856a6ce58fb5b168680c53fd7652f63f46 (diff) | |
download | PSP.git-39a34b99185b3c046fb4427d07dd333575962e29.tar.gz PSP.git-39a34b99185b3c046fb4427d07dd333575962e29.tar.xz PSP.git-39a34b99185b3c046fb4427d07dd333575962e29.zip |
A lot of text bugfixes
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r-- | Project/Workspace.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp index dfdf65f..9c491c4 100644 --- a/Project/Workspace.cpp +++ b/Project/Workspace.cpp @@ -1153,9 +1153,14 @@ bool Workspace::RunPowerFlow() void Workspace::UpdateTextElements() { + double basePower = m_properties->GetSimulationPropertiesData().basePower; + if(m_properties->GetSimulationPropertiesData().basePowerUnit == UNIT_kVA) + basePower *= 1e3; + else if(m_properties->GetSimulationPropertiesData().basePowerUnit == UNIT_MVA) + basePower *= 1e6; for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; ++it) { Text* text = *it; - text->UpdateText(m_properties->GetSimulationPropertiesData().basePower); + text->UpdateText(basePower); } } |