Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
00c4d6e3
Commit
00c4d6e3
authored
Nov 11, 2015
by
eric pellegrini
Browse files
Bug fix with QVectorsPlugin when trying to close the first q vectors tab
Bug fix with SphericalQVectors (no status start defined)
parent
3463d2d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Plugins/QVectorsPlugin.py
View file @
00c4d6e3
...
...
@@ -228,16 +228,13 @@ class QVectorsPlugin(UserDefinitionPlugin):
self
.
Destroy
()
def
on_close_tab
(
self
,
event
):
if
event
.
GetSelection
()
==
0
:
qPanel
=
event
.
GetEventObject
().
GetPage
(
event
.
GetSelection
())
if
qPanel
.
progress
.
is_running
():
d
=
wx
.
MessageDialog
(
None
,
'The background task is still running. You must cancel it before closing this tab.'
,
'Warning'
,
wx
.
OK
|
wx
.
ICON_WARNING
)
d
.
ShowModal
()
event
.
Veto
()
else
:
qPanel
=
event
.
GetEventObject
().
GetPage
(
event
.
GetSelection
())
if
qPanel
.
progress
.
is_running
():
d
=
wx
.
MessageDialog
(
None
,
'The background task is still running. You must cancel it before closing this tab.'
,
'Warning'
,
wx
.
OK
|
wx
.
ICON_WARNING
)
d
.
ShowModal
()
event
.
Veto
()
return
return
def
generate_q_vectors
(
self
,
generator
):
...
...
MDANSE/Framework/QVectors/SphericalQVectors.py
View file @
00c4d6e3
...
...
@@ -59,6 +59,9 @@ class SphericalQVectors(IQVectors):
nVectors
=
self
.
_configuration
[
"n_vectors"
][
"value"
]
self
.
_configuration
[
"q_vectors"
]
=
{}
if
self
.
_status
is
not
None
:
self
.
_status
.
start
(
len
(
self
.
_configuration
[
"shells"
][
"value"
]))
for
q
in
self
.
_configuration
[
"shells"
][
"value"
]:
...
...
MDANSE/GUI/ComboWidgets/ProgressBar.py
View file @
00c4d6e3
...
...
@@ -43,8 +43,10 @@ class ProgressBar(wx.Panel,Status):
def
start_status
(
self
):
print
self
.
nSteps
,
self
.
currentStep
self
.
_stop
.
Enable
()
self
.
_progress
.
SetValue
(
self
.
currentStep
)
self
.
_progress
.
SetValue
(
0
)
self
.
_progress
.
SetRange
(
self
.
nSteps
)
self
.
_progress
.
SetBarColor
(
wx
.
GREEN
)
...
...
@@ -54,6 +56,6 @@ class ProgressBar(wx.Panel,Status):
self
.
_progress
.
Refresh
()
def
update_status
(
self
):
self
.
_progress
.
SetValue
(
self
.
currentStep
)
self
.
_progress
.
Refresh
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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