Commit b4f281a6 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Redraw screen when todo.txt is modified externally

parent a217dab9
...@@ -112,6 +112,7 @@ class UIApplication(CLIApplicationBase): ...@@ -112,6 +112,7 @@ class UIApplication(CLIApplicationBase):
self.todolist.erase() self.todolist.erase()
self.todolist.add_list(self.todofile.read()) self.todolist.add_list(self.todofile.read())
self._update_all_columns() self._update_all_columns()
self._redraw()
self.column_width = config().column_width() self.column_width = config().column_width()
self.todofile = TodoFile.TodoFile(config().todotxt(), callback) self.todofile = TodoFile.TodoFile(config().todotxt(), callback)
...@@ -558,13 +559,16 @@ class UIApplication(CLIApplicationBase): ...@@ -558,13 +559,16 @@ class UIApplication(CLIApplicationBase):
self._console_visible = True self._console_visible = True
self.console.print_text(p_text) self.console.print_text(p_text)
def _redraw(self):
self.mainloop.draw_screen()
def _input(self, p_question): def _input(self, p_question):
self._print_to_console(p_question) self._print_to_console(p_question)
# don't wait for the event loop to enter idle, there is a command # don't wait for the event loop to enter idle, there is a command
# waiting for input right now, so already go ahead and draw the # waiting for input right now, so already go ahead and draw the
# question on screen. # question on screen.
self.mainloop.draw_screen() self._redraw()
user_input = self.mainloop.screen.get_input() user_input = self.mainloop.screen.get_input()
self._console_visible = False self._console_visible = False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment