diff --git a/wizard/WizardCreateDevice1.qml b/wizard/WizardCreateDevice1.qml index a9b15303..cebe0183 100644 --- a/wizard/WizardCreateDevice1.qml +++ b/wizard/WizardCreateDevice1.qml @@ -184,4 +184,10 @@ Rectangle { wizardCreateDevice1.update(); console.log() } + + function onPageCompleted(previousView){ + if(previousView.viewName == "wizardHome"){ + walletInput.reset(); + } + } } diff --git a/wizard/WizardCreateWallet1.qml b/wizard/WizardCreateWallet1.qml index 5d484408..69866abd 100644 --- a/wizard/WizardCreateWallet1.qml +++ b/wizard/WizardCreateWallet1.qml @@ -144,4 +144,10 @@ Rectangle { } } } + + function onPageCompleted(previousView){ + if(previousView.viewName == "wizardHome"){ + walletInput.reset(); + } + } } diff --git a/wizard/WizardRestoreWallet1.qml b/wizard/WizardRestoreWallet1.qml index cff87b4d..95e125fe 100644 --- a/wizard/WizardRestoreWallet1.qml +++ b/wizard/WizardRestoreWallet1.qml @@ -305,6 +305,7 @@ Rectangle { function onPageCompleted(previousView){ if(previousView.viewName == "wizardHome"){ // cleanup + walletInput.reset(); seedInput.text = ""; addressLine.text = ""; spendKeyLine.text = ""; diff --git a/wizard/WizardWalletInput.qml b/wizard/WizardWalletInput.qml index aba521f7..e8946647 100644 --- a/wizard/WizardWalletInput.qml +++ b/wizard/WizardWalletInput.qml @@ -52,6 +52,11 @@ GridLayout { return false; } + function reset() { + walletName.error = !walletName.verify(); + walletLocation.error = walletLocation.text === ""; + } + MoneroComponents.LineEdit { id: walletName Layout.fillWidth: true