Browse Source

Thread safety test for issue 152

pull/154/head
Chris Kiehl 8 years ago
parent
commit
9b59cc3031
1 changed files with 6 additions and 0 deletions
  1. 6
      gooey/gui/presenter.py

6
gooey/gui/presenter.py

@ -6,6 +6,7 @@ from gooey.gui.pubsub import pub
from gooey.gui import events
from gooey.gui.windows import layouts
import wx
class Presenter(object):
def __init__(self, view, model):
@ -70,6 +71,11 @@ class Presenter(object):
self.syncronize_from_model()
def syncronize_from_model(self):
#TODO move this out of the presenter
#TODO Make all view interactions thread safe
wx.CallAfter(self.syncronize_from_model_async)
def syncronize_from_model_async(self):
# update heading titles
self.view.heading_title = self.model.heading_title
self.view.heading_subtitle = self.model.heading_subtitle

Loading…
Cancel
Save