Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Fix savefig GUI in GTK backend #9410

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 1 commit into from
Oct 15, 2017
Merged

Conversation

ahaldane
Copy link
Contributor

Fixes #9407

PR Summary

This fixes a bug in #9407 that the line defining startpath was mistakenyl removed in the gtk backend, causing users to be unable to save figures. Compare this line to line 567 in backend_gtk3.py (link) which correctly kept the definition.

As far as I understand the desired logic is that the startpath rc param is only overwritten if the user didn't explicitly set it to an empty string, which would signify to always use the current dir.

I don't have experience writing unit tests for gui behavior.. If you would like one, could you point me to where this would go?

@tacaswell tacaswell added this to the v2.1.1 milestone Oct 15, 2017
@tacaswell
Copy link
Member

We do not have good test coverage on the UI interaction (which is why they bug slipped in!) because GUI testing is just hard to begin with and due to difficulty in managing multiple GUI frameworks in the test process.

I am 👍 on this without a test

@tacaswell tacaswell added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Oct 15, 2017
@anntzer
Copy link
Contributor

anntzer commented Oct 15, 2017

Thanks!

@anntzer anntzer merged commit b35e240 into matplotlib:master Oct 15, 2017
@anntzer
Copy link
Contributor

anntzer commented Oct 15, 2017

I have a PR in preparation (well, mostly just waiting for the current backlog to clear...) to add pyflakes testing, which should be able to catch this kind of things.

dstansby added a commit that referenced this pull request Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.1.0: Cannot save figures in GTK backend
3 participants