Commit f701624
committed
RadioButtons: fix self._clicked method (followup to matplotlib#30997)
In matplotlib#30997 the classes `RadioButtons` & `CheckButtons` started sharing
more code, as they are fundamentally similar. When copy-pasting the
methods that were seemingly identical, the `_clicked` method was copied
from the original `CheckButtons` class, and there the `self._frames`
object was used instead of `self._buttons`. This caused an error when
actually using and clicking on buttons created with `RadioButtons`, as
the `RadioButtons._frames` doesn't exist - something that unfortunately
the tests did not catch.
Both `CheckButtons._frames` and `CheckButtons._buttons` are very similar
so even before matplotlib#30997 the `CheckButtons._clicked` method could have used
`self._checks` and not `self._frames`. Hence this change should be
harmless.1 parent 8ea8f69 commit f701624
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1110 | 1110 | | |
1111 | 1111 | | |
1112 | 1112 | | |
1113 | | - | |
| 1113 | + | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | | - | |
1117 | | - | |
| 1116 | + | |
| 1117 | + | |
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
| |||
0 commit comments