openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #11923
[Merge] lp:~trb143/openlp/bug-827027 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bug-827027 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #827027 in OpenLP: "Added mediaitems are not sorted"
https://bugs.launchpad.net/openlp/+bug/827027
For more details, see:
https://code.launchpad.net/~trb143/openlp/bug-827027/+merge/75855
Fix lists to sort if new items are added for Images, Media and Presentations
--
https://code.launchpad.net/~trb143/openlp/bug-827027/+merge/75855
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bug-827027 into lp:openlp.
=== modified file 'openlp/core/__init__.py'
--- openlp/core/__init__.py 2011-09-04 20:00:10 +0000
+++ openlp/core/__init__.py 2011-09-17 13:13:41 +0000
@@ -236,7 +236,6 @@
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()
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2011-09-06 17:53:43 +0000
+++ openlp/core/lib/mediamanageritem.py 2011-09-17 13:13:41 +0000
@@ -376,18 +376,23 @@
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,
Follow ups