Skip to content

Commit 5ec0c60

Browse files
committed
CSSTUDIO-1928 In setValueRange(), compare the adjusted "low" and "high" to the previous values of "low" and "high" before deciding not to update the range.
1 parent 8d570c4 commit 5ec0c60

File tree

1 file changed

+6
-3
lines changed
  • app/rtplot/src/main/java/org/csstudio/javafx/rtplot/internal

1 file changed

+6
-3
lines changed

app/rtplot/src/main/java/org/csstudio/javafx/rtplot/internal/AxisPart.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,7 @@ final synchronized public AxisRange<T> getValueRange()
263263
public boolean setValueRange(T low, T high)
264264
{
265265
synchronized (this)
266-
{ // Any change at all?
267-
if (low.equals(range.getLow()) && high.equals(range.getHigh()))
268-
return false;
266+
{
269267
logger.log(Level.FINE, "Axis {0}: Value range {1} ... {2}",
270268
new Object[] { getName(), low, high });
271269
// Adjust range if necessary
@@ -277,6 +275,11 @@ public boolean setValueRange(T low, T high)
277275
logger.log(Level.WARNING, "Axis {0}: Bad value range {1} ... {2}. Adjusting the range to {3} ... {4}.",
278276
new Object[] { getName(), low, high, newLow, newHigh });
279277
}
278+
279+
// Any change at all?
280+
if (newLow.equals(range.getLow()) && newHigh.equals(range.getHigh()))
281+
return false;
282+
280283
range = new AxisRange<>(newLow, newHigh);
281284
transform.config(newLow, newHigh, low_screen, high_screen);
282285
}

0 commit comments

Comments
 (0)