-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Register figureoptions edits in views history. #6598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register figureoptions edits in views history. #6598
Conversation
lib/matplotlib/backend_bases.py
Outdated
@partial(canvas.mpl_connect, 'draw_event') | ||
def define_home(event): | ||
self.push_current() | ||
canvas.mpl_disconnect(define_home) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to update the docs on mpl_disconnect
that this works with a function instead of a cid.
Independent of that, I do not see where this is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I now understand this and I like it 😄
I have not seen this pattern before, can you leave a short comment as to what this is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Modulo a comment for the sake of other maintainers 👍 |
488ed9e
to
ebb2c01
Compare
I think this picked up a merge conflict from #6599 |
ebb2c01
to
70dcaa6
Compare
Fixed. |
If you use |
I think this will also insert a state when only changing colors etc. I think the |
Done. |
beb642c
to
486f0b1
Compare
Kindly bumping. |
This has conflicts from (I suspect) the alpha related PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contingent on rebase.
Changing axes limits in views history is now taken into account by the views history navigation. The home position is now defined the first time the figure canvas is drawn (rather than the first time an edit button is selected), via a one-shot callback.
Thanks to @tacaswell for fixing the case where the multiple edits are applied consecutively.
486f0b1
to
d601ad1
Compare
done |
Changing axes limits in views history is now taken into account by the
views history navigation. The home position is now defined the first
time the figure canvas is drawn (rather than the first time an edit
button is selected), via a one-shot callback.