Integrated: 6939: Time range indicator isn't updated when setting the time range

Alex Macdonald aptmac at openjdk.java.net
Tue Apr 13 14:29:16 UTC 2021


On Fri, 9 Apr 2021 15:35:34 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

> This PR addresses JMC-6939 [[0]](https://bugs.openjdk.java.net/browse/JMC-6939), in which the time range indicator does not update when setting a time range.
> 
> The issue here is that visible range of the chart is not updated when a new range is selected. In `onFlavorSelected()`, the table is updated with the new selection, but the chart is not. Here I've added a line to set the visible range with the new selection values. Additionally, I've tweaked the if-statement so that when "No Selection" is selected in the flavor selector the table & chart display the default selection. Previously if the "No Selection" option was selected after viewing a different selection, because `selectionItems` is null there would be no update to the table or chart; now it is really showing "No Selection".
> 
> There was also a problem with the time range indicator in the flavor selector not updating properly when a selection is chosen. The issue seems to be the `layout()` call not resulting in a redraw of the canvas, so it has been changed to `redraw()` instead.
> 
> [0] https://bugs.openjdk.java.net/browse/JMC-6939
> 
> ### Gif examples:
> 
> **Before**
> The table updates correctly, but the chart doesn't.
> The flavor selector time range indicator doesn't redraw as expected.
> ![6939-before](https://user-images.githubusercontent.com/10425301/114095984-2051b080-988c-11eb-97a7-64f90465049d.gif)
> 
> **After**
> The chart updates to the selected time range, and the flavor selector redraws as expected.
> ![6939-after](https://user-images.githubusercontent.com/10425301/114096008-2a73af00-988c-11eb-9a77-196bd47f9ef7.gif)

This pull request has now been integrated.

Changeset: 033cc933
Author:    Alex Macdonald <aptmac at openjdk.org>
URL:       https://git.openjdk.java.net/jmc/commit/033cc933
Stats:     17 lines in 3 files changed: 2 ins; 4 del; 11 mod

6939: Time range indicator isn't updated when setting the time range

Reviewed-by: hirt

-------------

PR: https://git.openjdk.java.net/jmc/pull/238


More information about the jmc-dev mailing list