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
25a53678
Commit
25a53678
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Settings functions check to see if a wx.App exists, and do nothing if
not.
parent
bd93bbc0
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/utils/settings.py
+7
-1
7 additions, 1 deletion
fsl/utils/settings.py
with
7 additions
and
1 deletion
fsl/utils/settings.py
+
7
−
1
View file @
25a53678
...
@@ -14,6 +14,9 @@ def read(name, default=None):
...
@@ -14,6 +14,9 @@ def read(name, default=None):
try
:
import
wx
try
:
import
wx
except
:
return
None
except
:
return
None
if
wx
.
GetApp
()
is
None
:
return
None
config
=
wx
.
Config
(
'
fsleyes
'
)
config
=
wx
.
Config
(
'
fsleyes
'
)
value
=
config
.
Read
(
name
)
value
=
config
.
Read
(
name
)
...
@@ -28,7 +31,10 @@ def read(name, default=None):
...
@@ -28,7 +31,10 @@ def read(name, default=None):
def
write
(
name
,
value
):
def
write
(
name
,
value
):
try
:
import
wx
try
:
import
wx
except
:
return
None
except
:
return
if
wx
.
GetApp
()
is
None
:
return
value
=
str
(
value
)
value
=
str
(
value
)
config
=
wx
.
Config
(
'
fsleyes
'
)
config
=
wx
.
Config
(
'
fsleyes
'
)
...
...
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