Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
9aa62719
Commit
9aa62719
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Ridiculous workaround to a ridiculous problem - it seems that GLCanvas
cannot be hidden when running over SSH/X11.
parent
3b9e7067
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/fsleyes/gl/wxglslicecanvas.py
+26
-0
26 additions, 0 deletions
fsl/fsleyes/gl/wxglslicecanvas.py
fsl/fsleyes/views/orthopanel.py
+3
-1
3 additions, 1 deletion
fsl/fsleyes/views/orthopanel.py
with
29 additions
and
1 deletion
fsl/fsleyes/gl/wxglslicecanvas.py
+
26
−
0
View file @
9aa62719
...
@@ -43,3 +43,29 @@ class WXGLSliceCanvas(slicecanvas.SliceCanvas,
...
@@ -43,3 +43,29 @@ class WXGLSliceCanvas(slicecanvas.SliceCanvas,
self
.
_updateDisplayBounds
()
self
.
_updateDisplayBounds
()
ev
.
Skip
()
ev
.
Skip
()
self
.
Bind
(
wx
.
EVT_SIZE
,
onResize
)
self
.
Bind
(
wx
.
EVT_SIZE
,
onResize
)
def
Boow
(
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_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
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
)
This diff is collapsed.
Click to expand it.
fsl/fsleyes/views/orthopanel.py
+
3
−
1
View file @
9aa62719
...
@@ -406,8 +406,10 @@ class OrthoPanel(canvaspanel.CanvasPanel):
...
@@ -406,8 +406,10 @@ class OrthoPanel(canvaspanel.CanvasPanel):
for
canvas
,
labels
,
show
in
zip
(
canvases
,
allLabels
,
shows
):
for
canvas
,
labels
,
show
in
zip
(
canvases
,
allLabels
,
shows
):
# See WXGLSliceCanvas.Show for
# details of a horrible bug, and
# equally horrible workaround..
canvas
.
Show
(
show
)
canvas
.
Show
(
show
)
self
.
__canvasSizer
.
Show
(
canvas
,
show
)
for
label
in
labels
.
values
():
for
label
in
labels
.
values
():
self
.
__canvasSizer
.
Show
(
label
,
show
and
opts
.
showLabels
)
self
.
__canvasSizer
.
Show
(
label
,
show
and
opts
.
showLabels
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment