From c32550997de36e28115cd8cc939ece424a8f4f5c Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 17 Aug 2022 09:46:08 -0400 Subject: [PATCH] fix jfx error in SpreadView --- .../bisq/desktop/main/market/spread/SpreadView.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/main/market/spread/SpreadView.java b/desktop/src/main/java/bisq/desktop/main/market/spread/SpreadView.java index c7d0e72917..1b37e4d418 100644 --- a/desktop/src/main/java/bisq/desktop/main/market/spread/SpreadView.java +++ b/desktop/src/main/java/bisq/desktop/main/market/spread/SpreadView.java @@ -23,7 +23,7 @@ import bisq.desktop.components.AutoTooltipLabel; import bisq.desktop.components.AutoTooltipTableColumn; import bisq.desktop.components.ColoredDecimalPlacesWithZerosText; import bisq.desktop.util.GUIUtil; - +import bisq.common.UserThread; import bisq.core.locale.CurrencyUtil; import bisq.core.locale.Res; import bisq.core.util.FormattingUtils; @@ -129,10 +129,12 @@ public class SpreadView extends ActivatableViewAndModel item.numberOfSellOffers).sum(); String total = formatter.formatCoin(Coin.valueOf(sortedList.stream().mapToLong(item -> item.totalAmount.value).sum())); - numberOfOffersColumn.setGraphic(new AutoTooltipLabel(Res.get("market.spread.numberOfOffersColumn", numberOfOffers))); - numberOfBuyOffersColumn.setGraphic(new AutoTooltipLabel(Res.get("market.spread.numberOfBuyOffersColumn", numberOfBuyOffers))); - numberOfSellOffersColumn.setGraphic(new AutoTooltipLabel((Res.get("market.spread.numberOfSellOffersColumn", numberOfSellOffers)))); - totalAmountColumn.setGraphic(new AutoTooltipLabel(Res.get("market.spread.totalAmountColumn", total))); + UserThread.execute(() -> { + numberOfOffersColumn.setGraphic(new AutoTooltipLabel(Res.get("market.spread.numberOfOffersColumn", numberOfOffers))); + numberOfBuyOffersColumn.setGraphic(new AutoTooltipLabel(Res.get("market.spread.numberOfBuyOffersColumn", numberOfBuyOffers))); + numberOfSellOffersColumn.setGraphic(new AutoTooltipLabel((Res.get("market.spread.numberOfSellOffersColumn", numberOfSellOffers)))); + totalAmountColumn.setGraphic(new AutoTooltipLabel(Res.get("market.spread.totalAmountColumn", total))); + }); } ///////////////////////////////////////////////////////////////////////////////////////////