Skip to content

Commit

Permalink
Fix for RR-CirKits definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dheap committed Dec 10, 2019
1 parent 08d6446 commit d9b8d59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions java/src/jmri/jmrit/symbolicprog/SplitVariableValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,9 @@ void exitField() {
// there may be a lost focus event left in the queue when disposed so protect
if (_textField != null && !oldContents.equals(_textField.getText())) {
long newFieldVal = getValueFromText(_textField.getText());
log.debug("_minVal = {},_maxVal = {},newFieldVal = {}", _minVal, _maxVal, newFieldVal);
if (newFieldVal < _minVal || newFieldVal > _maxVal) {
log.debug("_minVal={};_maxVal={};newFieldVal={}",
Long.toUnsignedString(_minVal), Long.toUnsignedString(_maxVal), Long.toUnsignedString(newFieldVal));
if (Long.compareUnsigned(newFieldVal, _minVal) < 0 || Long.compareUnsigned(newFieldVal, _maxVal) > 0) {
_textField.setText(oldContents);
} else {
long newVal = (newFieldVal - mOffset) / mFactor;
Expand Down

0 comments on commit d9b8d59

Please sign in to comment.