Commit c75c6207 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

MNT: X11/SSH slice canavs hack does not seem to be neceesary, as of wxpython 4.1.1

parent 96830499
......@@ -69,34 +69,3 @@ class WXGLSliceCanvas(slicecanvas.SliceCanvas,
centre = self.getDisplayCentre()
self._updateDisplayBounds()
self.centreDisplayAt(*centre)
def Show(self, show):
"""Overrides ``GLCanvas.Show``. When running over SSH/X11, it doesn't
seem to be possible to hide a ``GLCanvas`` - the most recent scene
displayed on the canvas seems to persist, does not get overridden, and
gets drawn on top of other things in the interface:
.. image:: images/x11_slicecanvas_show_bug.png
:scale: 50%
:align: center
This is not ideal, and I have no idea why it occurs. The only
workaround that I've found to work is, instead of hiding the canvas,
to set its size to 0. So this method does just that.
"""
# If not in SSH, we can just
# show/hide normally.
if not fwidgets.inSSHSession():
wxgl.GLCanvas.Show(self, show)
elif not show:
self.SetMinSize((0, 0))
self.SetMaxSize((0, 0))
self.SetSize( (0, 0))
def Hide(self):
"""Overrides ``GLCanvas.Hide``. Calls :meth:`Show`. """
self.Show(False)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment