Fixed up a bug where the song import progress dialog would show up and not disappear if a user did not select any song databases to import.

This commit is contained in:
Raoul Snyman 2011-03-14 20:40:27 +02:00
parent 82239abb92
commit e0ea2c57a3

View File

@ -258,6 +258,8 @@ class SongsPlugin(Plugin):
for sfile in os.listdir(db_dir): for sfile in os.listdir(db_dir):
if sfile.startswith(u'songs_') and sfile.endswith(u'.sqlite'): if sfile.startswith(u'songs_') and sfile.endswith(u'.sqlite'):
song_dbs.append(os.path.join(db_dir, sfile)) song_dbs.append(os.path.join(db_dir, sfile))
if len(song_dbs) == 0:
return
progress = QtGui.QProgressDialog(self.formparent) progress = QtGui.QProgressDialog(self.formparent)
progress.setWindowModality(QtCore.Qt.WindowModal) progress.setWindowModality(QtCore.Qt.WindowModal)
progress.setLabelText(translate('OpenLP.Ui', 'Starting import...')) progress.setLabelText(translate('OpenLP.Ui', 'Starting import...'))