Skip to content

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

Merged
merged 2 commits into from
Aug 13, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jun 17, 2016

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.

@partial(canvas.mpl_connect, 'draw_event')
def define_home(event):
self.push_current()
canvas.mpl_disconnect(define_home)
Copy link
Member

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.

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@tacaswell tacaswell modified the milestones: 2.0.1 (next bug fix release), 2.1 (next point release) Jun 17, 2016
@tacaswell
Copy link
Member

Modulo a comment for the sake of other maintainers 👍

@anntzer anntzer force-pushed the history-for-figureoptions branch 3 times, most recently from 488ed9e to ebb2c01 Compare June 17, 2016 17:46
@tacaswell
Copy link
Member

I think this picked up a merge conflict from #6599

@anntzer anntzer force-pushed the history-for-figureoptions branch from ebb2c01 to 70dcaa6 Compare June 18, 2016 05:05
@anntzer
Copy link
Contributor Author

anntzer commented Jun 18, 2016

Fixed.

@tacaswell
Copy link
Member

If you use apply and then OK this inserts an extra (identical) state into the history.

@tacaswell
Copy link
Member

I think this will also insert a state when only changing colors etc. I think the push_current needs to be guarded by a check that the limits actually changed.

@anntzer
Copy link
Contributor Author

anntzer commented Jun 20, 2016

Done.

@anntzer anntzer force-pushed the history-for-figureoptions branch from beb642c to 486f0b1 Compare June 21, 2016 02:14
@anntzer
Copy link
Contributor Author

anntzer commented Aug 1, 2017

Kindly bumping.

@tacaswell
Copy link
Member

This has conflicts from (I suspect) the alpha related PR.

Copy link
Member

@tacaswell tacaswell left a 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.
@anntzer anntzer force-pushed the history-for-figureoptions branch from 486f0b1 to d601ad1 Compare August 10, 2017 13:19
@anntzer
Copy link
Contributor Author

anntzer commented Aug 10, 2017

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants