FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bugfix/qt4 savefile by WeatherGod · Pull Request #33 · matplotlib/matplotlib · GitHub

Repository navigation

Bugfix/qt4 savefile - #33

Merged
1 commit merged into
matplotlib:v1.0.xfrom
WeatherGod:bugfix/qt4_savefile
Mar 8, 2011
Merged

1 commit merged into
matplotlib:v1.0.xfrom
WeatherGod:bugfix/qt4_savefile

Conversation

Copy link
Copy Markdown
Member

This is an attempt to support the change in the PyQt4 API of getSaveFileName(). There is now a _getSaveFileName variable that gets conditionally assigned either the old getSaveFileName method or a lambda function that wraps a call to the new getSaveFileNameAndFilter(). The lambda function was necessary so that only the filename part of the tuple returned by getSaveFileNameAndFilter() gets returned by the call to _getSaveFileName().

I have only tested the case where sip.getapi("QString") returns 1. I would greatly appreciate if others with different versions of PyQt4 test to make sure this works.

Note that the API for getSaveFileName is dependent upon which version of PyQt4 you have and requires a conditional selection of the appropriate function call.

ddale commented Mar 7, 2011

Copy link
Copy Markdown
Contributor

I tested this with python-2.7 by doing the following:

>>> import sip
>>> sip.setapi('QString', 2)
>>> import pylab
>>> pylab.plot([1,2])
>>> pylab.show()

and then clicking the save button on the toolbar. Without your patch, an error is raised. With the patch, it worked as desired. I think it is ok to merge.

richbwood mentioned this pull request Dec 19, 2012
WeatherGod deleted the bugfix/qt4_savefile branch July 23, 2014 12:55
fariza added a commit to fariza/matplotlib that referenced this pull request Sep 22, 2016
report compatible python2.7
Simplification of plotting
simplification of report by forcing the output directory parameter
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL