Skip to content

BUG: Fix savefig GUI in GTK backend - #9410

Merged
anntzer merged 1 commit into
matplotlib:masterfrom
ahaldane:fix_savefig
Oct 15, 2017
Merged

anntzer merged 1 commit into
matplotlib:masterfrom
ahaldane:fix_savefig

Conversation

@ahaldane

Copy link
Copy Markdown
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
Copy Markdown
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

anntzer commented Oct 15, 2017

Copy link
Copy Markdown
Contributor

Thanks!

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

anntzer commented Oct 15, 2017

Copy link
Copy Markdown
Contributor

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