forked from openlp/openlp
Only load list if changed
This commit is contained in:
parent
62979a0062
commit
11424c8a7a
@ -382,13 +382,15 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
fullList.append(unicode(self.listView.item(count).
|
fullList.append(unicode(self.listView.item(count).
|
||||||
data(QtCore.Qt.UserRole).toString()))
|
data(QtCore.Qt.UserRole).toString()))
|
||||||
duplicatesFound = False
|
duplicatesFound = False
|
||||||
|
filesAdded = False
|
||||||
for file in files:
|
for file in files:
|
||||||
filename = os.path.split(unicode(file))[1]
|
filename = os.path.split(unicode(file))[1]
|
||||||
if filename in names:
|
if filename in names:
|
||||||
duplicatesFound = True
|
duplicatesFound = True
|
||||||
else:
|
else:
|
||||||
|
filesAdded = True
|
||||||
fullList.append(file)
|
fullList.append(file)
|
||||||
if fullList:
|
if fullList and filesAdded:
|
||||||
self.listView.clear()
|
self.listView.clear()
|
||||||
self.loadList(fullList)
|
self.loadList(fullList)
|
||||||
lastDir = os.path.split(unicode(files[0]))[0]
|
lastDir = os.path.split(unicode(files[0]))[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user