chiark / gitweb /
Remove the hard dependency on the publisher part from wx, so the mac version works...
authordaid <daid303@gmail.com>
Fri, 7 Nov 2014 12:30:06 +0000 (13:30 +0100)
committerdaid <daid303@gmail.com>
Fri, 7 Nov 2014 12:30:06 +0000 (13:30 +0100)
Cura/gui/mainWindow.py

index 91bede596b86702f4de4034fe89b88859a54685e..0ec23a3236b055c1fc10968365b5a31d6bdab17d 100644 (file)
@@ -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(";")