StandardDialog: reset button text on close

This commit is contained in:
selsta 2020-04-25 21:10:25 +02:00
parent 585fb2810d
commit 4b0dcb95bf
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E
3 changed files with 4 additions and 2 deletions

View file

@ -90,6 +90,10 @@ Rectangle {
function close() { function close() {
root.visible = false; root.visible = false;
// reset button text
okButton.text = qsTr("OK")
cancelButton.text = qsTr("Cancel")
closeCallback(); closeCallback();
} }

View file

@ -1481,7 +1481,6 @@ ApplicationWindow {
confirmationDialog.text += qsTr("Note: lmdb folder not found. A new folder will be created.") + "\n\n" confirmationDialog.text += qsTr("Note: lmdb folder not found. A new folder will be created.") + "\n\n"
confirmationDialog.icon = StandardIcon.Question confirmationDialog.icon = StandardIcon.Question
confirmationDialog.cancelText = qsTr("Cancel")
// Continue // Continue
confirmationDialog.onAcceptedCallback = function() { confirmationDialog.onAcceptedCallback = function() {

View file

@ -212,7 +212,6 @@ Rectangle {
+ "The old wallet cache file will be renamed and can be restored later.\n" + "The old wallet cache file will be renamed and can be restored later.\n"
); );
confirmationDialog.icon = StandardIcon.Question confirmationDialog.icon = StandardIcon.Question
confirmationDialog.cancelText = qsTr("Cancel")
confirmationDialog.onAcceptedCallback = function() { confirmationDialog.onAcceptedCallback = function() {
appWindow.closeWallet(function() { appWindow.closeWallet(function() {
walletManager.clearWalletCache(persistentSettings.wallet_path); walletManager.clearWalletCache(persistentSettings.wallet_path);