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
1 changed files with 2 additions and 0 deletions

View File

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