ExpressionParser: Clear expression variables on UpdateReferences call. I don't know if this is most sensible.

This commit is contained in:
Jordan Woyak 2018-12-30 16:08:54 -06:00
parent e896835f86
commit 35e51ebbaa
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ void EmulatedController::UpdateReferences(const ControllerInterface& devi)
{
m_default_device_is_connected = devi.HasConnectedDevice(m_default_device);
// Reset variables:
m_expression_vars.clear();
ciface::ExpressionParser::ControlEnvironment env(devi, GetDefaultDevice(), m_expression_vars);
UpdateReferences(env);