4959: Errors raised by Organize Tags window related to tag removal

svn: r17675
This commit is contained in:
Michiel Nauta 2011-06-03 12:11:18 +00:00
parent 186057add6
commit 1567978f9d

View File

@ -342,6 +342,7 @@ class OrganizeTagsDialog(object):
for new_priority, row in enumerate(self.namemodel.model): for new_priority, row in enumerate(self.namemodel.model):
if row[0] != new_priority: if row[0] != new_priority:
tag = self.db.get_tag_from_handle(row[1]) tag = self.db.get_tag_from_handle(row[1])
if tag:
tag.set_priority(new_priority) tag.set_priority(new_priority)
self.db.commit_tag(tag, trans) self.db.commit_tag(tag, trans)
@ -512,7 +513,7 @@ class OrganizeTagsDialog(object):
self.db.remove_tag(tag_handle, trans) self.db.remove_tag(tag_handle, trans)
self.__change_tag_priority(trans) self.__change_tag_priority(trans)
store.remove(iter_) self.namemodel.remove(iter_)
status.end() status.end()
#------------------------------------------------------------------------- #-------------------------------------------------------------------------