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
e7e3eca7
Commit
e7e3eca7
authored
10 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Made internal listener names a bit more explicit
parent
e0cd0f38
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/props/build.py
+1
-1
1 addition, 1 deletion
fsl/props/build.py
fsl/props/widgets.py
+4
-2
4 additions, 2 deletions
fsl/props/widgets.py
with
5 additions
and
3 deletions
fsl/props/build.py
+
1
−
1
View file @
e7e3eca7
...
@@ -653,7 +653,7 @@ def _prepareEvents(hasProps, propGui):
...
@@ -653,7 +653,7 @@ def _prepareEvents(hasProps, propGui):
# add a callback listener to every property
# add a callback listener to every property
for
propObj
,
propName
in
zip
(
propObjs
,
propNames
):
for
propObj
,
propName
in
zip
(
propObjs
,
propNames
):
lName
=
'
ChangeEvent_{}
'
.
format
(
propName
)
lName
=
'
build_py_WhenEvent
'
propObj
.
addListener
(
hasProps
,
lName
,
onChange
)
propObj
.
addListener
(
hasProps
,
lName
,
onChange
)
...
...
This diff is collapsed.
Click to expand it.
fsl/props/widgets.py
+
4
−
2
View file @
e7e3eca7
...
@@ -85,7 +85,7 @@ def _propBind(hasProps, propObj, propVal, guiObj, evType, labelMap=None):
...
@@ -85,7 +85,7 @@ def _propBind(hasProps, propObj, propVal, guiObj, evType, labelMap=None):
if
not
isinstance
(
evType
,
Iterable
):
evType
=
[
evType
]
if
not
isinstance
(
evType
,
Iterable
):
evType
=
[
evType
]
listenerName
=
'
prop
Bind_{}
'
.
format
(
id
(
guiObj
))
listenerName
=
'
Widget
Bind_{}
'
.
format
(
id
(
guiObj
))
valMap
=
None
valMap
=
None
if
labelMap
is
not
None
:
if
labelMap
is
not
None
:
...
@@ -160,7 +160,9 @@ def _setupValidation(widget, hasProps, propObj, propVal):
...
@@ -160,7 +160,9 @@ def _setupValidation(widget, hasProps, propObj, propVal):
# associated with multiple variables, and we don't want
# associated with multiple variables, and we don't want
# the widgets associated with those other variables to
# the widgets associated with those other variables to
# change background.
# change background.
propVal
.
addListener
(
'
changeBGOnValidate
'
,
_changeBGOnValidate
)
propVal
.
addListener
(
'
widgets_py_ChangeBG_{}
'
.
format
(
id
(
widget
)),
_changeBGOnValidate
)
# Validate the initial property value,
# Validate the initial property value,
# so the background is appropriately set
# so the background is appropriately set
...
...
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