mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix edit meta info dialog clobbering time iformation in timestamp
This commit is contained in:
parent
4bd766bd49
commit
e81b241895
@ -357,6 +357,7 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
|
|||||||
self.pubdate.setDate(QDate(pubdate.year, pubdate.month,
|
self.pubdate.setDate(QDate(pubdate.year, pubdate.month,
|
||||||
pubdate.day))
|
pubdate.day))
|
||||||
timestamp = db.timestamp(self.id, index_is_id=True)
|
timestamp = db.timestamp(self.id, index_is_id=True)
|
||||||
|
self.orig_timestamp = timestamp
|
||||||
self.date.setDate(QDate(timestamp.year, timestamp.month,
|
self.date.setDate(QDate(timestamp.year, timestamp.month,
|
||||||
timestamp.day))
|
timestamp.day))
|
||||||
|
|
||||||
@ -656,7 +657,8 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
|
|||||||
self.db.set_pubdate(self.id, d)
|
self.db.set_pubdate(self.id, d)
|
||||||
d = self.date.date()
|
d = self.date.date()
|
||||||
d = qt_to_dt(d)
|
d = qt_to_dt(d)
|
||||||
self.db.set_timestamp(self.id, d)
|
if d.date() != self.orig_timestamp.date():
|
||||||
|
self.db.set_timestamp(self.id, d)
|
||||||
|
|
||||||
if self.cover_changed:
|
if self.cover_changed:
|
||||||
if self.cover_data is not None:
|
if self.cover_data is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user