Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vecs
FIJI Public
Commits
074d886d
Commit
074d886d
authored
Dec 01, 2017
by
Stefan Tauner
Browse files
Use 'depends_on' value for enablements checks only if its type is boolean
parent
a3cd32be
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/FIJI.pm
View file @
074d886d
...
...
@@ -202,7 +202,8 @@ logo_end
# where values present in the input are not validated at all.
# - depends_on (optional) specifies the key of another constant.
# The respective constant is only relevant (and thus required as input)
# if the value of the referenced constant is true.
# if the value of the referenced constant is of type boolean and its value true.
# Additionally, the values function will get the value of the depends_on setting passed.
# - group (optional) specifies how to group this value in output. Value will not be displayed if undef
# - order (optional) specifies how to sort this value in output group
# - noedit (optional) display value, but don't allow to alter
...
...
@@ -860,8 +861,9 @@ use constant FIUMAP => \%fiumap;
# where no value must be present in input (e.g. ID is only necessary while downloading).
# - gui_modes (optional) specifies in which mode of {manual,auto,random} this key will be displayed in the GUI
# - depends_on (optional) specifies the key of another constant.
# The respective constant is only relevant (and thuse required as input)
# if the value of the referenced constant is true.
# The respective constant is only relevant (and thus required as input)
# if the value of the referenced constant is of type boolean and its value true.
# Additionally, the values function will get the value of the depends_on setting passed.
# - order (optional) specifies how to sort this value in output group
# - default (optional) default value if not given in file and not determinable otherwise.
# Can either be a scalar or a function pointer expecting a FIJI settings reference.
...
...
bin/Tk/FIJISettingsViewer.pm
View file @
074d886d
...
...
@@ -1614,7 +1614,7 @@ sub _validate_entry {
if
(
defined
(
$map
->
{
$name
}
->
{'
depends_on
'}))
{
$dep_ref
=
\
$self
->
{'
settings
'}
->
{'
design
'}
->
{
$map
->
{
$name
}
->
{'
depends_on
'}};
# don't validate if this entry is disabled
if
(
$$dep_ref
==
0
)
{
if
(
$map
->
{
$name
}
->
{'
type
'}
eq
'
boolean
'
and
$$dep_ref
==
0
)
{
$logger
->
debug
("
Don't validate
$name
as it is disabled.
");
$self
->
_indicate_warning
(
$widget
,
0
,
$map
,
$name
);
return
undef
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment