Commit 8cde5a8
committed
Fail early when setting Text color to a non-colorlike.
Otherwise, the error is only raised when drawing the artist, which is
always confusing. Also add a general `_check_color_like` mechanism and
use it for Line2D as well, instead of relying on a slightly strange
`if not is_color_like(): check_in_list(get_named_colors_mapping())`
call where the check_in_list *always* fails.1 parent a510e32 commit 8cde5a8
4 files changed
+20
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
150 | 159 | | |
151 | 160 | | |
152 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
1050 | 1049 | | |
1051 | 1050 | | |
1052 | 1051 | | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
| 1052 | + | |
| 1053 | + | |
1056 | 1054 | | |
1057 | 1055 | | |
1058 | 1056 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
937 | 941 | | |
938 | 942 | | |
939 | 943 | | |
| |||
0 commit comments