From 59280d10b75cd944b6a9665aa1ce057722c3b936 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Mon, 20 Jun 2011 22:57:34 +0100 Subject: [PATCH] Preserve greyed out of next button in import wizard --- openlp/core/ui/wizard.py | 8 ++++++++ openlp/plugins/songs/forms/songimportform.py | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/openlp/core/ui/wizard.py b/openlp/core/ui/wizard.py index 6bc3e2df6..9d8a106ed 100644 --- a/openlp/core/ui/wizard.py +++ b/openlp/core/ui/wizard.py @@ -190,6 +190,14 @@ class OpenLPWizard(QtGui.QWizard): self.preWizard() self.performWizard() self.postWizard() + else: + self.customPageChanged(pageId) + + def customPageChanged(self, pageId): + """ + Called when changing to a page other than the progress page + """ + pass def onErrorCopyToButtonClicked(self): """ diff --git a/openlp/plugins/songs/forms/songimportform.py b/openlp/plugins/songs/forms/songimportform.py index faaddd3eb..4ab60d360 100644 --- a/openlp/plugins/songs/forms/songimportform.py +++ b/openlp/plugins/songs/forms/songimportform.py @@ -343,6 +343,13 @@ class SongImportForm(OpenLPWizard): self.formatSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + def customPageChanged(self, pageId): + """ + Called when changing to a page other than the progress page + """ + if self.page(pageId) == self.sourcePage: + self.onCurrentIndexChanged(self.formatStack.currentIndex()) + def validateCurrentPage(self): """ Validate the current page before moving on to the next page.