From: daid Date: Fri, 7 Nov 2014 12:30:06 +0000 (+0100) Subject: Remove the hard dependency on the publisher part from wx, so the mac version works... X-Git-Tag: lulzbot-14.12~28 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0bca15f04f894401ca2ddff80a3645cce9da54c5;p=cura.git Remove the hard dependency on the publisher part from wx, so the mac version works again. --- diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index d6e75b4b..03cc8770 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -25,7 +25,11 @@ from Cura.util import version import platform from Cura.util import meshLoader -from wx.lib.pubsub import Publisher +try: + #MacOS release currently lacks some wx components, like the Publisher. + from wx.lib.pubsub import Publisher +except: + Publisher = None class mainWindow(wx.Frame): def __init__(self): @@ -274,7 +278,8 @@ class mainWindow(wx.Frame): self.updateSliceMode() self.scene.SetFocus() self.dialogframe = None - Publisher().subscribe(self.onPluginUpdate, "pluginupdate") + if Publisher is not None: + Publisher().subscribe(self.onPluginUpdate, "pluginupdate") def onPluginUpdate(self,msg): #receives commands from the plugin thread cmd = str(msg.data).split(";")