From 39a34b99185b3c046fb4427d07dd333575962e29 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Tue, 24 Oct 2017 21:14:59 -0200 Subject: A lot of text bugfixes --- Project/Workspace.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Project/Workspace.cpp') 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); } } -- cgit