Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD 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
FSL
fslpy
Commits
ae56b1fb
Commit
ae56b1fb
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Horrible hack to force notification of ModelOpts.refImage/coordSpace changes
parent
0a13c6d8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/fsleyes/displaycontext/modelopts.py
+26
-0
26 additions, 0 deletions
fsl/fsleyes/displaycontext/modelopts.py
with
26 additions
and
0 deletions
fsl/fsleyes/displaycontext/modelopts.py
+
26
−
0
View file @
ae56b1fb
...
...
@@ -368,7 +368,33 @@ class ModelOpts(fsldisplay.DisplayOpts):
lohi
.
sort
(
axis
=
0
)
lo
,
hi
=
lohi
[
0
,
:],
lohi
[
1
,
:]
oldBounds
=
self
.
bounds
self
.
bounds
=
[
lo
[
0
],
hi
[
0
],
lo
[
1
],
hi
[
1
],
lo
[
2
],
hi
[
2
]]
# Horrible hack here.
# The coordSpace/refImage/transform property
# change may not result in a change to the
# bound values. But listeners of the bounds
# property need to be notified regardless, as
# the model space has changed (e.g. it may
# have just been flipped along an axis).
# For example, the OrthoPanel needs to refresh
# its orientation labels.
#
# This method is only called on the 'master'
# ModelOpts instance - the bounds on child
# instances are synced automatically. So we
# have to force notification of all bounds
# listeners on the child instances.
#
# Hopefully in the future I will come up with
# a solution to these horrible parent-child
# discrepancies.
if
oldBounds
==
self
.
bounds
:
children
=
self
.
getChildren
()
for
c
in
[
self
]
+
children
:
c
.
notify
(
'
bounds
'
)
def
__overlayListChanged
(
self
,
*
a
):
...
...
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