mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2074147 [[Enhancement Request] Date change form 'undefined' with mouse wheel error](https://bugs.launchpad.net/calibre/+bug/2074147)
This commit is contained in:
parent
d5c2fa29ec
commit
e5ef3b8b88
@ -2004,6 +2004,13 @@ class DateEdit(make_undoable(DateTimeEdit), ToMetadataMixin):
|
|||||||
else:
|
else:
|
||||||
return super().keyPressEvent(ev)
|
return super().keyPressEvent(ev)
|
||||||
|
|
||||||
|
def wheelEvent(self, ev):
|
||||||
|
if is_date_undefined(self.current_val):
|
||||||
|
self.setDateTime(QDateTime.currentDateTime())
|
||||||
|
ev.accept()
|
||||||
|
else:
|
||||||
|
return super().wheelEvent(ev)
|
||||||
|
|
||||||
|
|
||||||
class PubdateEdit(DateEdit):
|
class PubdateEdit(DateEdit):
|
||||||
LABEL = _('P&ublished:')
|
LABEL = _('P&ublished:')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user