From f8fabbe4c577421bf9e1180ae915e37a46e0ffe5 Mon Sep 17 00:00:00 2001
From: Jaquee <jaquee.monero@gmail.com>
Date: Wed, 23 Nov 2016 19:32:30 +0100
Subject: [PATCH] reset restore height counter when switching wallets

---
 main.qml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/main.qml b/main.qml
index c09f0c3c..23bde514 100644
--- a/main.qml
+++ b/main.qml
@@ -134,6 +134,7 @@ ApplicationWindow {
 
     function openWalletFromFile(){
         persistentSettings.restore_height = 0
+        restoreHeight = 0;
         persistentSettings.is_recovering = false
         appWindow.password = ""
         fileDialog.open();
@@ -179,6 +180,7 @@ ApplicationWindow {
             console.log("using wizard wallet")
             //Set restoreHeight
             if(persistentSettings.restore_height > 0){
+                // We store restore height in own variable for performance reasons.
                 restoreHeight = persistentSettings.restore_height
             }