diff options
author | Jaime van Kessel <nallath@gmail.com> | 2020-04-20 14:52:40 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2020-04-20 14:52:40 +0300 |
commit | 9a2d2d32bfc8524e8229ea7561b4499c482bfcd9 (patch) | |
tree | 06ef94b12f4256147d2f616069a8139945f517f3 /plugins/SolidView | |
parent | 40bc3e247fe6afd666094ba6c7c6472a081ff6bb (diff) |
Remove code that prevents Cura from starting on MAC
The renderer isn't active when the view is activated. As such,
no opengl context *ever* exists. In some cases this might cause it to get
stuck in an indefinate loop.
The comments around it are explaining a situation that can't occur. The activateView
event of SolidView isn't triggered when switching to another view...
Diffstat (limited to 'plugins/SolidView')
-rw-r--r-- | plugins/SolidView/SolidView.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 8c9967be03..bd8215aba5 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -286,25 +286,6 @@ class SolidView(View): Logger.log("i", "X-Ray overlay found non-manifold pixels.") def event(self, event): - if event.type == Event.ViewActivateEvent: - # FIX: on Max OS X, somehow QOpenGLContext.currentContext() can become None during View switching. - # This can happen when you do the following steps: - # 1. Start Cura - # 2. Load a model - # 3. Switch to Custom mode - # 4. Select the model and click on the per-object tool icon - # 5. Switch view to Layer view or X-Ray - # 6. Cura will very likely crash - # It seems to be a timing issue that the currentContext can somehow be empty, but I have no clue why. - # This fix tries to reschedule the view changing event call on the Qt thread again if the current OpenGL - # context is None. - if Platform.isOSX(): - if QOpenGLContext.currentContext() is None: - Logger.log("d", "current context of OpenGL is empty on Mac OS X, will try to create shaders later") - Application.getInstance().callLater(lambda e = event: self.event(e)) - return - - if event.type == Event.ViewDeactivateEvent: if self._composite_pass and 'xray' in self._composite_pass.getLayerBindings(): self.getRenderer().removeRenderPass(self._xray_pass) |