mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-10 08:37:05 +00:00
disable clear button when no utxos are selected
This commit is contained in:
@@ -83,6 +83,9 @@ public class UtxosController extends WalletFormController implements Initializab
|
||||
@FXML
|
||||
private Button mixTo;
|
||||
|
||||
@FXML
|
||||
private Button clear;
|
||||
|
||||
@FXML
|
||||
private Button sendSelected;
|
||||
|
||||
@@ -172,6 +175,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
||||
}
|
||||
}
|
||||
|
||||
clear.setDisable(true);
|
||||
sendSelected.setDisable(true);
|
||||
sendSelected.setTooltip(new Tooltip("Send selected UTXOs. Use " + (org.controlsfx.tools.Platform.getCurrent() == org.controlsfx.tools.Platform.OSX ? "Cmd" : "Ctrl") + "+click to select multiple." ));
|
||||
mixSelected.managedProperty().bind(mixSelected.visibleProperty());
|
||||
@@ -199,6 +203,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
||||
private void updateButtons(BitcoinUnit unit) {
|
||||
List<Entry> selectedEntries = getSelectedEntries();
|
||||
|
||||
clear.setDisable(selectedEntries.isEmpty());
|
||||
sendSelected.setDisable(selectedEntries.isEmpty());
|
||||
mixSelected.setDisable(selectedEntries.isEmpty() || !AppServices.isConnected());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user