You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecate Toolbar.press/release; add helper to find overridden methods.
Even though the docs stated that NavigationToolbar2.press/.release were
called whenever a mouse button was pressed/released, these methods were
in fact *only* called when this button press/release occurred at the
beginning/end of an interactive pan or zoom; even then they were only
used by the wx backend to set up some stuff at the beginning/end of a
zoom.
Instead wx can just override press_zoom and release_zoom to insert
its additional code, and we can deprecate the confusingly named
.press() and .release() (in general, users should just connect
to "button_press/release_event" if they want all such events
anyways). As usual, we need to not only deprecate the methods on the
NavigationToolbar2 class, but also detect if third-party subclasses
have overridden them and also warn in that case. This pattern
(warn-if-overridden-by-subclass) occurs now quite a few times in the
codebase, so add a helper (_deprecate_method_override) to handle that.
0 commit comments