Preserve greyed out of next button in import wizard

This commit is contained in:
Jonathan Corwin 2011-06-20 22:57:34 +01:00
parent cd75b33a4d
commit 59280d10b7
2 changed files with 15 additions and 0 deletions

View File

@ -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):
"""

View File

@ -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.