From 15f2976cd81342095b98d2f20299a847cd6f55b6 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 1 Sep 2009 20:15:55 +0100 Subject: [PATCH 1/2] Fix display monitor test logic --- openlp/core/ui/mainwindow.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 997ca8a7c..55b053aca 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -500,8 +500,14 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): monitor number does not exist. """ screen_number = int(self.generalConfig.get_config(u'Monitor', 0)) - if screen_number not in self.screenList: + + monitor_exists = False + for i in self.screenList: + if i[u'number'] == screen_number: + monitor_exists = True + if not monitor_exists: screen_number = 0 + return screen_number def show(self): From 94dbcc1a28c0f16b56c56bdaa37997da61e9f876 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 1 Sep 2009 20:39:49 +0100 Subject: [PATCH 2/2] Fix index naming in screen fix --- openlp/core/ui/mainwindow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 55b053aca..f494d1880 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -502,8 +502,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): screen_number = int(self.generalConfig.get_config(u'Monitor', 0)) monitor_exists = False - for i in self.screenList: - if i[u'number'] == screen_number: + for screen in self.screenList: + if screen[u'number'] == screen_number: monitor_exists = True if not monitor_exists: screen_number = 0