Skip to content

Commit

Permalink
Thread safety test for issue 152
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskiehl committed Feb 13, 2016
1 parent 1351fbb commit 9b59cc3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gooey/gui/presenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from gooey.gui import events
from gooey.gui.windows import layouts

import wx

class Presenter(object):
def __init__(self, view, model):
Expand Down Expand Up @@ -70,6 +71,11 @@ def update_model(self):
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
Expand Down

0 comments on commit 9b59cc3

Please sign in to comment.