Fix: Document.last_style must be a glyphdb.Style object, not tuple.

This commit is contained in:
Andrey Golovizin 2014-09-12 13:14:39 +02:00
parent 018ad843e5
commit 3f48f68b46

View file

@ -21,7 +21,7 @@ from os import path
from . import formatting from . import formatting
from .image import Image from .image import Image
from .page import Page, Space from .page import Page, Space
from .glyphdb import GlyphDB, SPACE, NEWLINE from .glyphdb import GlyphDB, Style, SPACE, NEWLINE
from .config import Configuration from .config import Configuration
@ -36,7 +36,7 @@ class Document(object):
self.glyphdb = GlyphDB(path.join(self.dirname, 'glyphdb.pickle')) self.glyphdb = GlyphDB(path.join(self.dirname, 'glyphdb.pickle'))
self.config = Configuration.load_file(path.join(self.dirname, 'config.yaml')) self.config = Configuration.load_file(path.join(self.dirname, 'config.yaml'))
self.output_format = output_format self.output_format = output_format
self.last_style = (False, False, (255, 255, 255)) # FIXME get rid of hardcoded value self.last_style = Style(bold=False, italic=False, color=(255, 255, 255)) # FIXME get rid of hardcoded value
def save_glyphdb(self): def save_glyphdb(self):
self.glyphdb.save() self.glyphdb.save()