From 06b725d20d0c1341eca9e0ca85ab7495cb1765d7 Mon Sep 17 00:00:00 2001
From: Inso <insomniak.fr@gmail.com>
Date: Wed, 10 Jun 2015 22:18:02 +0200
Subject: [PATCH] Fix bad preferences initialization

---
 src/cutecoin/core/app.py       | 2 +-
 src/cutecoin/gui/mainwindow.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cutecoin/core/app.py b/src/cutecoin/core/app.py
index ef02f895..7619336a 100644
--- a/src/cutecoin/core/app.py
+++ b/src/cutecoin/core/app.py
@@ -53,7 +53,7 @@ class Application(QObject):
         self._network_manager.finished.connect(self.read_available_version)
         self.preferences = {'account': "",
                             'lang': 'en_GB',
-                            'ref': 'Units'
+                            'ref': 0
                             }
 
         self.load()
diff --git a/src/cutecoin/gui/mainwindow.py b/src/cutecoin/gui/mainwindow.py
index 605d12d7..72e05de0 100644
--- a/src/cutecoin/gui/mainwindow.py
+++ b/src/cutecoin/gui/mainwindow.py
@@ -353,6 +353,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
 
             self.combo_referential.setEnabled(True)
             self.combo_referential.blockSignals(False)
+            logging.debug(self.app.preferences)
             self.combo_referential.setCurrentIndex(self.app.preferences['ref'])
             self.menu_account.setEnabled(True)
             self.action_configure_parameters.setEnabled(True)
-- 
GitLab