From 0b1420bce0354c37efd89a832ded2a996f5f4917 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 31 May 2018 22:21:53 +0200 Subject: [PATCH] use simulation model in inputDataChanged() --- src/containers/widget.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/containers/widget.js b/src/containers/widget.js index 6006484..039ae21 100644 --- a/src/containers/widget.js +++ b/src/containers/widget.js @@ -164,9 +164,19 @@ class Widget extends React.Component { } inputDataChanged(widget, data) { + let simulationModel = null; + + for (let model of this.state.simulationModels) { + if (model._id !== widget.simulationModel) { + continue; + } + + simulationModel = model; + } + AppDispatcher.dispatch({ type: 'simulatorData/inputChanged', - simulator: widget.simulator, + simulator: simulationModel.simulator, signal: widget.signal, data });