Edit metadata dialog: Fix a bug that broke adding of a file to the book that calibre did not previously know about in the books directory while simultaneously changing the author or title of the book. Fixes #922003 (New comma-enabled author folder name can cause data loss)

This commit is contained in:
Kovid Goyal 2012-01-26 16:58:02 +05:30
parent e172e0cf52
commit 5a211a5783

View File

@ -169,7 +169,10 @@ class MetadataSingleDialogBase(ResizableDialog):
self.basic_metadata_widgets.extend([self.series, self.series_index]) self.basic_metadata_widgets.extend([self.series, self.series_index])
self.formats_manager = FormatsManager(self, self.copy_fmt) self.formats_manager = FormatsManager(self, self.copy_fmt)
self.basic_metadata_widgets.append(self.formats_manager) # We want formats changes to be committed before title/author, as
# otherwise we could have data loss if the title/author changed and the
# user was trying to add an extra file from the old books directory.
self.basic_metadata_widgets.insert(0, self.formats_manager)
self.formats_manager.metadata_from_format_button.clicked.connect( self.formats_manager.metadata_from_format_button.clicked.connect(
self.metadata_from_format) self.metadata_from_format)
self.formats_manager.cover_from_format_button.clicked.connect( self.formats_manager.cover_from_format_button.clicked.connect(