if self._getAuthorizationWindow.abort:
wx.CallAfter(self._getAuthorizationWindow.Destroy)
return
+ #TODO: Bug, this should not be called from a python thread but a wx.Timer (wx.TheClipboard does not function from threads on Linux)
clipboard = getClipboardText()
if len(clipboard) == 20:
if clipboard != lastTriedClipboard and re.match('[a-zA-Z0-9]*', clipboard):
glLineWidth(2)
layerNr = self.layerSelect.getValue()
- if layerNr == self.layerSelect.getMaxValue():
+ if layerNr == self.layerSelect.getMaxValue() and result is not None:
layerNr = max(layerNr, len(result._polygons))
viewZ = (layerNr - 1) * profile.getProfileSettingFloat('layer_height') + profile.getProfileSettingFloat('bottom_thickness')
self._parent._viewTarget[2] = viewZ
openglHelpers.glDrawStringLeft("fps:%d" % (1 / renderTime))
self.SwapBuffers()
except:
+ # When an exception happens, catch it and show a message box. If the exception is not caught the draw function bugs out.
+ # Only show this exception once so we do not overload the user with popups.
errStr = _("An error has occurred during the 3D view drawing.")
tb = traceback.extract_tb(sys.exc_info()[2])
errStr += "\n%s: '%s'" % (str(sys.exc_info()[0].__name__), str(sys.exc_info()[1]))