Commit 53f66b3
committed
Fix double picks.
pick_events were previously incorrectly emitted twice due to the
combination of two recent(ish) chnages: Figures now always start with a
FigureCanvasBase attached -- eventually switching to a concrete subclass
of FigureCanvasBase for display or saving --, and callbacks are now
actually stored at the Figure level rather than the Canvas level.
Hence, the button_pick_id callback (in charge of emitting picks) would
previously be both registered both through the FigureCanvasBase and the
concrete subclass. The fix is to also move that callback to the Figure
level, so that each Figure only has one such callback.1 parent 97258e9 commit 53f66b3Copy full SHA for 53f66b3
File tree
Expand file treeCollapse file tree
3 files changed
+20
-5
lines changedOpen diff view settings
Filter options
- lib/matplotlib
- tests
Expand file treeCollapse file tree
3 files changed
+20
-5
lines changedOpen diff view settings
Collapse file
lib/matplotlib/backend_bases.py
Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py+3-5Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1726 | 1726 | |
1727 | 1727 | |
1728 | 1728 | |
1729 | | - |
1730 | | - |
1731 | 1729 | |
1732 | 1730 | |
1733 | 1731 | |
1734 | 1732 | |
1735 | | - |
1736 | | - |
1737 | | - |
| 1733 | + |
| 1734 | + |
| 1735 | + |
1738 | 1736 | |
1739 | 1737 | |
1740 | 1738 | |
|
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2106 | 2106 | |
2107 | 2107 | |
2108 | 2108 | |
| 2109 | + |
| 2110 | + |
| 2111 | + |
| 2112 | + |
2109 | 2113 | |
2110 | 2114 | |
2111 | 2115 | |
|
Collapse file
lib/matplotlib/tests/test_backend_bases.py
Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backend_bases.py+13Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
120 | 120 | |
121 | 121 | |
122 | 122 | |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
123 | 136 | |
124 | 137 | |
125 | 138 | |
|
0 commit comments