diff --git a/src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java b/src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java index 41b1a6fc..ae540ac4 100644 --- a/src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java +++ b/src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java @@ -77,7 +77,11 @@ public class TransactionController implements Initializable { fetchOutputBlockTransactions(initialIndex, initialIndex + 1); } - Platform.runLater(() -> transactionMasterDetail.setDividerPosition(AppServices.isReducedWindowHeight(transactionMasterDetail) ? 0.9 : 0.82)); + transactionMasterDetail.sceneProperty().addListener((observable, oldScene, newScene) -> { + if(oldScene == null && newScene != null) { + transactionMasterDetail.setDividerPosition(AppServices.isReducedWindowHeight(transactionMasterDetail) ? 0.9 : 0.82); + } + }); } private void initializeTxTree() { diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java index b355a7ee..67197c77 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java @@ -338,8 +338,10 @@ public class SendController extends WalletFormController implements Initializabl createButton.setDisable(walletTransaction == null || isInsufficientFeeRate()); }); - Platform.runLater(() -> { - transactionDiagram.update(null); + transactionDiagram.sceneProperty().addListener((observable, oldScene, newScene) -> { + if(oldScene == null && newScene != null) { + transactionDiagram.update(null); + } }); }