Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
202bcb4c
Commit
202bcb4c
authored
Apr 06, 2020
by
Remi Perenon
Browse files
Solving line edition issue
parent
71425b68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/GUI/Plugins/PlotterSettings.py
View file @
202bcb4c
...
...
@@ -596,7 +596,11 @@ class LinesSettingsDialog(wx.Dialog):
_id
=
0
for
k
in
self
.
parent
.
plots
.
keys
():
if
type
(
self
.
parent
.
plots
[
k
][
0
].
get_color
())
is
str
:
r
,
g
,
b
=
matplotlib
.
colors
.
colorConverter
.
colors
[
self
.
parent
.
plots
[
k
][
0
].
get_color
()]
try
:
r
,
g
,
b
=
matplotlib
.
colors
.
colorConverter
.
colors
[
self
.
parent
.
plots
[
k
][
0
].
get_color
()]
except
KeyError
:
color
=
self
.
parent
.
plots
[
k
][
0
].
get_color
().
lstrip
(
"#"
)
r
,
g
,
b
=
tuple
(
int
(
color
[
i
:
i
+
2
],
16
)
/
255.0
for
i
in
(
0
,
2
,
4
))
else
:
r
,
g
,
b
=
self
.
parent
.
plots
[
k
][
0
].
get_color
()
self
.
lines
.
InsertStringItem
(
index
=
_id
,
label
=
k
)
...
...
@@ -619,7 +623,11 @@ class LinesSettingsDialog(wx.Dialog):
self
.
parent
.
figure
.
canvas
.
draw
()
if
type
(
self
.
current_line
.
get_color
())
is
str
:
r
,
g
,
b
=
matplotlib
.
colors
.
colorConverter
.
colors
[
self
.
current_line
.
get_color
()]
try
:
r
,
g
,
b
=
matplotlib
.
colors
.
colorConverter
.
colors
[
self
.
current_line
.
get_color
()]
except
KeyError
:
color
=
self
.
current_line
.
get_color
().
lstrip
(
"#"
)
r
,
g
,
b
=
tuple
(
int
(
color
[
i
:
i
+
2
],
16
)
/
255.0
for
i
in
(
0
,
2
,
4
))
else
:
r
,
g
,
b
=
self
.
current_line
.
get_color
()
color
=
wx
.
Colour
(
int
(
r
*
255
),
int
(
g
*
255
),
int
(
b
*
255
))
...
...
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