mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4829 (Weird date format)
This commit is contained in:
parent
cf5ca45531
commit
8700214dc6
@ -97,7 +97,10 @@ class DateDelegate(QStyledItemDelegate):
|
||||
|
||||
def createEditor(self, parent, option, index):
|
||||
qde = QStyledItemDelegate.createEditor(self, parent, option, index)
|
||||
qde.setDisplayFormat(unicode(qde.displayFormat()).replace('yy', 'yyyy'))
|
||||
stdformat = unicode(qde.displayFormat())
|
||||
if 'yyyy' not in stdformat:
|
||||
stdformat = stdformat.replace('yy', 'yyyy')
|
||||
qde.setDisplayFormat(stdformat)
|
||||
qde.setMinimumDate(QDate(101,1,1))
|
||||
qde.setCalendarPopup(True)
|
||||
return qde
|
||||
|
@ -331,7 +331,6 @@ class Document(QWebPage):
|
||||
elem = self.find_bookmark_element()
|
||||
|
||||
if elem is None or self.element_ypos(elem) < 100:
|
||||
print elem, self.element_ypos(elem)
|
||||
bm = 'body|%f'%(float(self.ypos)/(self.height*0.7))
|
||||
else:
|
||||
bm = unicode(elem.evaluateJavaScript(
|
||||
|
Loading…
x
Reference in New Issue
Block a user