Skip to content

Commit 9b8b6e6

Browse files
committed
CSSTUDIO-1928 Remove invocations of adjustRange() from AxisPart.setValueRange() and AxisPart.computeTicks().
1 parent 785d7cc commit 9b8b6e6

File tree

1 file changed

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

1 file changed

+3
-13
lines changed

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,8 @@ public boolean setValueRange(T low, T high)
268268
return false;
269269
logger.log(Level.FINE, "Axis {0}: Value range {1} ... {2}",
270270
new Object[] { getName(), low, high });
271-
// Adjust range if necessary
272-
Pair<T, T> possiblyNewLowAndHigh = ticks.adjustRange(low, high);
273-
T newLow = possiblyNewLowAndHigh.getKey();
274-
T newHigh = possiblyNewLowAndHigh.getValue();
275-
if (newLow != low || newHigh != high)
276-
{
277-
logger.log(Level.WARNING, "Axis {0}: Bad value range {1} ... {2}. Adjusting the range to {3} ... {4}.",
278-
new Object[] { getName(), low, high, newLow, newHigh });
279-
}
280-
range = new AxisRange<>(newLow, newHigh);
281-
transform.config(newLow, newHigh, low_screen, high_screen);
271+
range = new AxisRange<>(low, high);
272+
transform.config(low, high, low_screen, high_screen);
282273
}
283274
dirty_ticks = true;
284275
requestLayout();
@@ -361,8 +352,7 @@ protected void computeTicks(final Graphics2D gc)
361352
{
362353
if (! dirty_ticks)
363354
return;
364-
Pair<T, T> adjustedRange = ticks.adjustRange(range.getLow(), range.getHigh());
365-
range = new AxisRange<>(adjustedRange.getKey(), adjustedRange.getValue());
355+
366356
if (horizontal)
367357
ticks.compute(range.getLow(), range.getHigh(), gc, getBounds().width);
368358
else

0 commit comments

Comments
 (0)