Skip to content
Snippets Groups Projects
Commit 2b8e1051 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Bugfix to slice canvas - hidden canvases were not re-creating GLObjects,

because they were unable to set the GL context. But it seems that GL
stuff can be created without setting the context. May need to test on
other platform(s) to confirm this.
parent 2b2c787f
No related branches found
No related tags found
No related merge requests found
......@@ -525,12 +525,9 @@ class SliceCanvas(props.HasProperties):
render texture associated with the overlay is destroyed.
"""
if not self._setGLContext():
return
# Tell the previous GLObject (if
# any) to clean up after itself
globj = self._glObjects.get(overlay, None)
globj = self._glObjects.pop(overlay, None)
if globj is not None:
globj.destroy()
......
......@@ -189,6 +189,7 @@ class OrthoPanel(canvaspanel.CanvasPanel):
self._displayCtx .removeListener('location', self._name)
self._displayCtx .removeListener('bounds', self._name)
self._displayCtx .removeListener('selectedOverlay', self._name)
self._displayCtx .removeListener('overlayOrder', self._name)
self._overlayList.removeListener('overlays', self._name)
# The _overlayListChanged method adds
......@@ -612,11 +613,7 @@ class OrthoPanel(canvaspanel.CanvasPanel):
flag = wx.ALIGN_CENTRE_HORIZONTAL | wx.ALIGN_CENTRE_VERTICAL
for w in widgets:
if w in [self._xcanvas, self._ycanvas, self._zcanvas]:
self._canvasSizer.Add(w, flag=flag)
else:
self._canvasSizer.Add(w, flag=flag)
self._canvasSizer.Add(w, flag=flag)
self.getCanvasPanel().SetSizer(self._canvasSizer)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment