You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, adding or removing strengths to or from a StrengthVarManager in a model (using get StrengthVarManager().getStrengthVarSet(). addAllStrengths()) is not reflected in the model: the resulting strengths can be changed, but changes are never passed to MAD-X.
The reason for this behavior is that JMadModelImpl has to register its listener for each strength to be passed to MAD-X. The only happens on initialization but not when the contents of the StrengthVarManager are modified.
To fix this, we would probably have to provide a listener in StrengthVarSet to observe strengths added/removed, and use this in JMadModelImpl to register the listener on the newly added strenghts (or remove it from deleted strengths, respectively).
In a second step, observing and concentrating the changes for all contained strengths could be completely delegated to StrengthVarSet, and the model would only add a single listener to StrengthVarSet (strengthValueChanged(Strength, newValue)) instead of tracking each Strength individually.
The text was updated successfully, but these errors were encountered:
At the moment, adding or removing strengths to or from a StrengthVarManager in a model (using
get StrengthVarManager().getStrengthVarSet(). addAllStrengths()
) is not reflected in the model: the resulting strengths can be changed, but changes are never passed to MAD-X.The reason for this behavior is that JMadModelImpl has to register its listener for each strength to be passed to MAD-X. The only happens on initialization but not when the contents of the StrengthVarManager are modified.
To fix this, we would probably have to provide a listener in StrengthVarSet to observe strengths added/removed, and use this in JMadModelImpl to register the listener on the newly added strenghts (or remove it from deleted strengths, respectively).
In a second step, observing and concentrating the changes for all contained strengths could be completely delegated to StrengthVarSet, and the model would only add a single listener to StrengthVarSet (strengthValueChanged(Strength, newValue)) instead of tracking each Strength individually.
The text was updated successfully, but these errors were encountered: