mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
disconnect slots before reconnecting
This commit is contained in:
parent
c9bb2f5718
commit
af933da0c9
1 changed files with 14 additions and 0 deletions
14
main.qml
14
main.qml
|
@ -147,6 +147,10 @@ ApplicationWindow {
|
|||
translationManager.setLanguage(locale.split("_")[0]);
|
||||
}
|
||||
|
||||
// disconnect handlers before connecting
|
||||
middlePanel.paymentClicked.disconnect(handlePayment);
|
||||
middlePanel.checkPaymentClicked.disconnect(handleCheckPayment);
|
||||
|
||||
middlePanel.paymentClicked.connect(handlePayment);
|
||||
// basicPanel.paymentClicked.connect(handlePayment);
|
||||
|
||||
|
@ -190,11 +194,21 @@ ApplicationWindow {
|
|||
function connectWallet(wallet) {
|
||||
showProcessingSplash()
|
||||
currentWallet = wallet
|
||||
|
||||
// Disconnect before connecting
|
||||
currentWallet.refreshed.disconnect(onWalletRefresh)
|
||||
currentWallet.updated.disconnect(onWalletUpdate)
|
||||
currentWallet.newBlock.disconnect(onWalletNewBlock)
|
||||
currentWallet.moneySpent.disconnect(onWalletMoneySent)
|
||||
currentWallet.moneyReceived.disconnect(onWalletMoneyReceived)
|
||||
|
||||
currentWallet.refreshed.connect(onWalletRefresh)
|
||||
currentWallet.updated.connect(onWalletUpdate)
|
||||
currentWallet.newBlock.connect(onWalletNewBlock)
|
||||
currentWallet.moneySpent.connect(onWalletMoneySent)
|
||||
currentWallet.moneyReceived.connect(onWalletMoneyReceived)
|
||||
|
||||
|
||||
console.log("initializing with daemon address: ", persistentSettings.daemon_address)
|
||||
console.log("Recovering from seed: ", persistentSettings.is_recovering)
|
||||
console.log("restore Height", persistentSettings.restore_height)
|
||||
|
|
Loading…
Reference in a new issue