terminal: set scrollbar to top if scrolled below new utxo table row count

This commit is contained in:
Craig Raw 2023-07-18 10:58:11 +02:00
parent ac7a964edf
commit f88628c469

View file

@ -192,6 +192,9 @@ public class UtxosDialog extends WalletDialog {
SparrowTerminal.get().getGuiThread().invokeLater(() -> {
TableModel<TableCell> tableModel = getTableModel(walletUtxosEntry);
utxos.setTableModel(tableModel);
if(utxos.getRenderer().getViewTopRow() >= tableModel.getRowCount()) {
utxos.getRenderer().setViewTopRow(0);
}
});
}