chiark / gitweb /
Retry publishing after 1 second, hoping that the renderer has ran then.
[cura.git] / Cura / gui / tools / youmagineGui.py
index b027540e3611c7fd08ed8c2702a1b3398f46f24c..d62b25a7f33ccfbef3a3c6491e92028e9945a662 100644 (file)
@@ -156,7 +156,10 @@ class youmagineManager(object):
 
                if publish:
                        wx.CallAfter(self._indicatorWindow.showBusy, 'Publishing design...')
-                       self._ym.publishDesign(id)
+                       if not self._ym.publishDesign(id):
+                               #If publishing failed try again after 1 second, this might help when you need to wait for the renderer. But does not always work.
+                               time.sleep(1)
+                               self._ym.publishDesign(id)
                wx.CallAfter(self._indicatorWindow.Hide)
 
                webbrowser.open(self._ym.viewUrlForDesign(id))