From b1940e929330ec03816878ad06fa5014aba56fbf Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 29 Mar 2022 17:38:39 +0200 Subject: [PATCH] fix issues updating utxo chart when mixing --- .../java/com/sparrowwallet/sparrow/control/UtxosChart.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/UtxosChart.java b/src/main/java/com/sparrowwallet/sparrow/control/UtxosChart.java index b0b006c1..daf8a97d 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/UtxosChart.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/UtxosChart.java @@ -57,6 +57,7 @@ public class UtxosChart extends BarChart { for(int i = 0; i < utxoDataList.size(); i++) { XYChart.Data newData = utxoDataList.get(i); + newData.setXValue((i+1) + ". " + newData.getXValue()); if(i < utxoSeries.getData().size()) { XYChart.Data existingData = utxoSeries.getData().get(i); if(!newData.getXValue().equals(existingData.getXValue()) || !newData.getYValue().equals(existingData.getYValue()) || (newData.getExtraValue() instanceof Entry && !newData.getExtraValue().equals(existingData.getExtraValue()))) { @@ -70,7 +71,7 @@ public class UtxosChart extends BarChart { } if(utxoSeries.getData().size() > utxoDataList.size()) { - utxoSeries.getData().remove(Math.max(0, utxoDataList.size() - 1), utxoSeries.getData().size()); + utxoSeries.getData().remove(utxoDataList.size(), utxoSeries.getData().size()); } if(selectedEntries != null) {