mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
make send to many dialog non-modal, menu command brings an existing dialog to foreground
This commit is contained in:
parent
30a9c1208a
commit
4c408ac7b1
1 changed files with 12 additions and 1 deletions
|
@ -210,6 +210,8 @@ public class AppController implements Initializable {
|
|||
|
||||
private Timeline statusTimeline;
|
||||
|
||||
private SendToManyDialog sendToManyDialog;
|
||||
|
||||
private Tab previouslySelectedTab;
|
||||
|
||||
private boolean subTabsVisible;
|
||||
|
@ -1286,6 +1288,13 @@ public class AppController implements Initializable {
|
|||
}
|
||||
|
||||
public void sendToMany(ActionEvent event) {
|
||||
if(sendToManyDialog != null) {
|
||||
Stage stage = (Stage)sendToManyDialog.getDialogPane().getScene().getWindow();
|
||||
stage.setAlwaysOnTop(true);
|
||||
stage.setAlwaysOnTop(false);
|
||||
return;
|
||||
}
|
||||
|
||||
WalletForm selectedWalletForm = getSelectedWalletForm();
|
||||
if(selectedWalletForm != null) {
|
||||
Wallet wallet = selectedWalletForm.getWallet();
|
||||
|
@ -1294,8 +1303,10 @@ public class AppController implements Initializable {
|
|||
bitcoinUnit = wallet.getAutoUnit();
|
||||
}
|
||||
|
||||
SendToManyDialog sendToManyDialog = new SendToManyDialog(bitcoinUnit);
|
||||
sendToManyDialog = new SendToManyDialog(bitcoinUnit);
|
||||
sendToManyDialog.initModality(Modality.NONE);
|
||||
Optional<List<Payment>> optPayments = sendToManyDialog.showAndWait();
|
||||
sendToManyDialog = null;
|
||||
optPayments.ifPresent(payments -> {
|
||||
if(!payments.isEmpty()) {
|
||||
EventManager.get().post(new SendActionEvent(wallet, new ArrayList<>(wallet.getSpendableUtxos().keySet())));
|
||||
|
|
Loading…
Reference in a new issue