mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-30 23:00:21 -04:00
Fix clicking on an empty published field in the book list to edit it setting the initial date to Jan 2000 instead of today's date
This commit is contained in:
parent
637ddf7d4e
commit
ea99a041d3
@ -300,7 +300,7 @@ class PubDateDelegate(QStyledItemDelegate, UpdateEditorGeometry): # {{{
|
|||||||
elif check_key_modifier(Qt.ShiftModifier + Qt.ControlModifier):
|
elif check_key_modifier(Qt.ShiftModifier + Qt.ControlModifier):
|
||||||
val = now()
|
val = now()
|
||||||
elif is_date_undefined(val):
|
elif is_date_undefined(val):
|
||||||
val = QDate(2000, 1, 1)
|
val = QDate.currentDate()
|
||||||
if isinstance(val, QDateTime):
|
if isinstance(val, QDateTime):
|
||||||
val = val.date()
|
val = val.date()
|
||||||
editor.setDate(val)
|
editor.setDate(val)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user