Skip to content

Commit

Permalink
Merge pull request #29 from psethwick/fix/output-invalidates
Browse files Browse the repository at this point in the history
Fix app not refreshing when output is toggled
  • Loading branch information
psethwick authored Feb 27, 2022
2 parents 526df4c + cc10963 commit 7e74105
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion plover_console_ui/console_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def status_bar_text(engine) -> str:


class ConsoleEngine(StenoEngine, Thread):
def __init__(self, config, keyboard_emulation, layout: ConsoleLayout, controller=None):
def __init__(
self, config, keyboard_emulation, layout: ConsoleLayout, controller=None
):
if controller:
StenoEngine.__init__(self, config, controller, keyboard_emulation)
else:
Expand All @@ -41,6 +43,11 @@ def __init__(self, config, keyboard_emulation, layout: ConsoleLayout, controller
self.hook_connect("add_translation", partial(layout.on_add_translation, self))
self.cmder = Commander(build_commands(self, layout), layout.output_to_console)

def on_output_changed(_):
get_app().invalidate()

self.hook_connect("output_changed", on_output_changed)

def on_lookup():
focus_console()
layout.cmder_input.text = ""
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = plover_console_ui
version = 1.2.0
version = 1.2.1
description = Text User Interface for Plover
long_description = file: README.rst
author = Seth Rider
Expand Down

0 comments on commit 7e74105

Please sign in to comment.