mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
fix issues updating utxo chart when mixing
This commit is contained in:
parent
1f51f632c4
commit
b1940e9293
1 changed files with 2 additions and 1 deletions
|
@ -57,6 +57,7 @@ public class UtxosChart extends BarChart<String, Number> {
|
|||
|
||||
for(int i = 0; i < utxoDataList.size(); i++) {
|
||||
XYChart.Data<String, Number> newData = utxoDataList.get(i);
|
||||
newData.setXValue((i+1) + ". " + newData.getXValue());
|
||||
if(i < utxoSeries.getData().size()) {
|
||||
XYChart.Data<String, Number> 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<String, Number> {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue