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
ca848cf9
Commit
ca848cf9
authored
10 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Fixed panning redraw issue on VNC/X11. Fixed ImageDisplayToolbar
enable/disable logic
parent
41c22187
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fsl/fslview/controls/imagedisplaytoolbar.py
+11
-6
11 additions, 6 deletions
fsl/fslview/controls/imagedisplaytoolbar.py
fsl/fslview/gl/__init__.py
+0
-5
0 additions, 5 deletions
fsl/fslview/gl/__init__.py
fsl/fslview/gl/slicecanvas.py
+1
-1
1 addition, 1 deletion
fsl/fslview/gl/slicecanvas.py
with
12 additions
and
12 deletions
fsl/fslview/controls/imagedisplaytoolbar.py
+
11
−
6
View file @
ca848cf9
...
...
@@ -94,6 +94,7 @@ class ImageDisplayToolBar(fsltoolbar.FSLViewToolBar):
for
tool
,
_
in
oldOptsTools
:
tool
.
Destroy
()
def
_toggleEnabled
(
self
,
*
a
):
image
=
self
.
_displayCtx
.
getSelectedImage
()
display
=
self
.
_displayCtx
.
getDisplayProperties
(
image
)
...
...
@@ -111,19 +112,23 @@ class ImageDisplayToolBar(fsltoolbar.FSLViewToolBar):
if
image
is
None
:
self
.
ClearTools
()
return
display
=
self
.
_displayCtx
.
getDisplayProperties
(
image
)
# Call _toggleEnabled when
# the image is enabled/disabled
self
.
Enable
(
display
.
enabled
)
for
i
in
self
.
_imageList
:
d
=
self
.
_displayCtx
.
getDisplayProperties
(
i
)
if
i
==
image
:
d
isplay
.
addListener
(
'
enabled
'
,
self
.
_name
,
self
.
_toggleEnabled
,
overwrite
=
True
)
d
.
addListener
(
'
enabled
'
,
self
.
_name
,
self
.
_toggleEnabled
,
overwrite
=
True
)
else
:
d
isplay
.
removeListener
(
'
enabled
'
,
self
.
_name
)
d
.
removeListener
(
'
enabled
'
,
self
.
_name
)
# Build/refresh the toolbar widgets for this image
tools
=
self
.
_imageTools
.
get
(
image
,
None
)
...
...
This diff is collapsed.
Click to expand it.
fsl/fslview/gl/__init__.py
+
0
−
5
View file @
ca848cf9
...
...
@@ -467,11 +467,6 @@ class WXGLCanvasTarget(object):
def
_refresh
(
self
,
*
a
):
"""
Triggers a redraw via the :meth:`_draw` method.
"""
# NOTE I'm not drawing via wx.Refresh/Update
# because, when running over ssh under X11,
# this doesn't seem to force a redraw. Calling
# the draw code directly seems to do the trick
self
.
Refresh
()
...
...
This diff is collapsed.
Click to expand it.
fsl/fslview/gl/slicecanvas.py
+
1
−
1
View file @
ca848cf9
...
...
@@ -293,8 +293,8 @@ class SliceCanvas(props.HasProperties):
# canvas change, we need to redraw
self
.
addListener
(
'
zax
'
,
self
.
name
,
self
.
_zAxisChanged
)
self
.
addListener
(
'
pos
'
,
self
.
name
,
self
.
_draw
)
self
.
addListener
(
'
displayBounds
'
,
self
.
name
,
self
.
_draw
)
self
.
addListener
(
'
showCursor
'
,
self
.
name
,
self
.
_refresh
)
self
.
addListener
(
'
displayBounds
'
,
self
.
name
,
self
.
_refresh
)
self
.
addListener
(
'
invertX
'
,
self
.
name
,
self
.
_refresh
)
self
.
addListener
(
'
invertY
'
,
self
.
name
,
self
.
_refresh
)
self
.
addListener
(
'
zoom
'
,
...
...
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