previewdoc: add correct handling of width/height
This commit is contained in:
parent
93c005765e
commit
90bf14cb6a
|
@ -398,3 +398,11 @@ class DocHistoLines(Field):
|
|||
|
||||
class PreviewDoc(Field):
|
||||
implements(IPreviewDoc, IFromUnicode)
|
||||
|
||||
def __init__(self, **kw):
|
||||
for attr in ('height', 'width'):
|
||||
if kw.get(attr):
|
||||
setattr(self, attr, kw.get('attr'))
|
||||
if attr in kw:
|
||||
del kw[attr]
|
||||
super(PreviewDoc, self).__init__(**kw)
|
||||
|
|
Reference in New Issue