Copy to library: Fix title sort not being copied

This commit is contained in:
Kovid Goyal 2011-12-28 20:34:45 +05:30
parent 83fcb8b96b
commit 9e04a6a609
2 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,6 @@ class CopyToLibraryAction(InterfaceAction):
return error_dialog(self.gui, _('No library'),
_('No library found at %s')%loc, show=True)
self.pd = ProgressDialog(_('Copying'), min=0, max=len(ids)-1,
parent=self.gui, cancelable=False)

View File

@ -2063,6 +2063,8 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
if path_changed:
self.set_path(id, index_is_id=True)
if should_replace_field('title_sort'):
self.set_title_sort(id, mi.title_sort, notify=False, commit=False)
if should_replace_field('author_sort'):
doit(self.set_author_sort, id, mi.author_sort, notify=False,
commit=False)