Skip to content

Commit 42b4a89

Browse files
committed
Compare with rgba value of none instead of "none"
This issue was reintroduced by mistake while refactoring a previous commit. Since `colors.same_color` doesn't accept strings, the comparison needs to be made against the rgba array of "none" and not the string itself.
1 parent ed74910 commit 42b4a89

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎lib/matplotlib/widgets.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,9 @@ def set_active(self, index):
10711071
cross_facecolors = self._crosses.get_facecolor()
10721072
cross_facecolors[index] = colors.to_rgba(
10731073
"black"
1074-
if colors.same_color(cross_facecolors[index], "none")
1074+
if colors.same_color(
1075+
cross_facecolors[index], colors.to_rgba("none")
1076+
)
10751077
else "none"
10761078
)
10771079
self._crosses.set_facecolor(cross_facecolors)

0 commit comments

Comments
 (0)