From f88628c469cc6e7ef955ecc745d3ade110fc7b1f Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 18 Jul 2023 10:58:11 +0200 Subject: [PATCH] terminal: set scrollbar to top if scrolled below new utxo table row count --- .../com/sparrowwallet/sparrow/terminal/wallet/UtxosDialog.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/terminal/wallet/UtxosDialog.java b/src/main/java/com/sparrowwallet/sparrow/terminal/wallet/UtxosDialog.java index 42ac5e67..94000aa6 100644 --- a/src/main/java/com/sparrowwallet/sparrow/terminal/wallet/UtxosDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/terminal/wallet/UtxosDialog.java @@ -192,6 +192,9 @@ public class UtxosDialog extends WalletDialog { SparrowTerminal.get().getGuiThread().invokeLater(() -> { TableModel tableModel = getTableModel(walletUtxosEntry); utxos.setTableModel(tableModel); + if(utxos.getRenderer().getViewTopRow() >= tableModel.getRowCount()) { + utxos.getRenderer().setViewTopRow(0); + } }); }