From 54bb80251432ff49c967115f8401e7dafc5c57d6 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Tue, 19 Dec 2017 22:00:05 -0200 Subject: Several implementations on math expression block --- Project/ControlElementSolver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Project/ControlElementSolver.cpp') diff --git a/Project/ControlElementSolver.cpp b/Project/ControlElementSolver.cpp index 4ca4ef4..3534023 100644 --- a/Project/ControlElementSolver.cpp +++ b/Project/ControlElementSolver.cpp @@ -204,8 +204,8 @@ void ControlElementSolver::SolveNextStep() ConnectionLine* child = static_cast(io->GetChildList()[0]); if(m_inputControl == io) firstConn = child; bool inputType = true; + io->SetSolved(); switch(io->GetValue()) { - io->SetSolved(); case IOControl::IN_TERMINAL_VOLTAGE: { child->SetValue(m_terminalVoltage); } break; @@ -235,6 +235,7 @@ void ControlElementSolver::SolveNextStep() } break; default: { inputType = false; + io->SetSolved(false); } break; } if(inputType) { @@ -286,7 +287,6 @@ void ControlElementSolver::SolveNextStep() io->SetSolved(); ConnectionLine* child = static_cast(io->GetChildList()[0]); switch(io->GetValue()) { - io->SetSolved(); case IOControl::OUT_MEC_POWER: { m_mecPower = child->GetValue(); m_solutions.push_back(m_mecPower); -- cgit