diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index a5347edeb..3c8bdfe71 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -236,7 +236,6 @@ def main(args=None): logfile.setFormatter(logging.Formatter( u'%(asctime)s %(name)-55s %(levelname)-8s %(message)s')) log.addHandler(logfile) - logging.addLevelName(15, u'Timer') # Parse command line options and deal with them. # Use args supplied programatically if possible. (options, args) = parser.parse_args(args) if args else parser.parse_args() diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 1c464f911..5366f3f68 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -376,18 +376,23 @@ class MediaManagerItem(QtGui.QWidget): The files to be loaded """ names = [] + fullList = [] for count in range(0, self.listView.count()): names.append(unicode(self.listView.item(count).text())) - newFiles = [] + fullList.append(unicode(self.listView.item(count). + data(QtCore.Qt.UserRole).toString())) duplicatesFound = False + filesAdded = False for file in files: filename = os.path.split(unicode(file))[1] if filename in names: duplicatesFound = True else: - newFiles.append(file) - if newFiles: - self.loadList(newFiles) + filesAdded = True + fullList.append(file) + if fullList and filesAdded: + self.listView.clear() + self.loadList(fullList) lastDir = os.path.split(unicode(files[0]))[0] SettingsManager.set_last_dir(self.settingsSection, lastDir) SettingsManager.set_list(self.settingsSection,