mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 16:43:06 +02:00
Fix #4829 (Weird date format)
This commit is contained in:
parent
cf5ca45531
commit
8700214dc6
2 changed files with 4 additions and 2 deletions
|
|
@ -97,7 +97,10 @@ def displayText(self, val, locale):
|
|||
|
||||
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 @@ def bookmark(self):
|
|||
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…
Reference in a new issue