Fix broken ask_for_help().
This commit is contained in:
parent
f771722d0b
commit
1f91582ccd
3 changed files with 4 additions and 4 deletions
|
|
@ -69,7 +69,7 @@ class Document(object):
|
|||
try:
|
||||
glyph_data = self.glyphdb[glyph]
|
||||
except KeyError:
|
||||
text, bold, italic = self.ui.ask_for_help(glyph)
|
||||
text, bold, italic = self.ui.ask_for_help(glyph, self.last_style.bold, self.last_style.italic)
|
||||
glyph_data = self.glyphdb.add_glyph(glyph, text, bold, italic)
|
||||
self.last_style = glyph_data.style
|
||||
return glyph_data
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ class GUIProxy(QObject, BaseUI):
|
|||
def process_events(self):
|
||||
qApp.processEvents()
|
||||
|
||||
def ask_for_help(self, unknown_glyph):
|
||||
self.unknownGlyph.emit(unknown_glyph, self.last_style.bold, self.last_style.italic)
|
||||
def ask_for_help(self, unknown_glyph, bold, italic):
|
||||
self.unknownGlyph.emit(unknown_glyph, bold, italic)
|
||||
return self.receive_help()
|
||||
|
||||
def give_help(self, *args):
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
|
||||
class BaseUI(object):
|
||||
def ask_for_help(self, unknown_glyph):
|
||||
def ask_for_help(self, unknown_glyph, bold, italic):
|
||||
raise NotImplementedError
|
||||
|
||||
def turn_page(self, page):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue