From 725bd7dcf6bd02af256593f8b9c42050851b75e1 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 11 Jan 2013 19:51:45 +0100 Subject: [PATCH] fixed bug doing bad things --- openlp/core/lib/settings.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index 47ec8692c..06900d65e 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -188,7 +188,7 @@ class Settings(QtCore.QSettings): u'themes/theme level': ThemeLevel.Song, u'themes/global theme': u'', u'themes/last directory': u'', - u'user interface/main window position': QtCore.QPoint(), + u'user interface/main window position': QtCore.QPoint(0, 0), u'user interface/preview panel': True, u'user interface/live panel': True, u'user interface/main window geometry': QtCore.QByteArray(), @@ -235,10 +235,11 @@ class Settings(QtCore.QSettings): ``key`` The key to return the value from. """ - if u'/' not in key: - key = u'/'.join((self.group(), key)) try: - defaultValue = Settings.__default_settings__[key] + if self.group(): + defaultValue = Settings.__default_settings__[self.group() + u'/' + key] + else: + defaultValue = Settings.__default_settings__[key] except KeyError: print u'KeyError: %s' % key return None