8000 Don't special-case getSaveFileName in qt_compat anymore. by anntzer · Pull Request #25143 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Don't special-case getSaveFileName in qt_compat anymore. #25143

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
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def save_figure(self, *args):
filters.append(filter)
filters = ';;'.join(filters)

fname, filter = qt_compat._getSaveFileName(
fname, filter = QtWidgets.QFileDialog.getSaveFileName(
self.canvas.parent(), "Choose a filename to save to", start,
filters, selectedFilter)
if fname:
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/backends/qt_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

def _setup_pyqt5plus():
global QtCore, QtGui, QtWidgets, __version__
global _getSaveFileName, _isdeleted, _to_int
global _isdeleted, _to_int

if QT_API == QT_API_PYQT6:
from PyQt6 import QtCore, QtGui, QtWidgets, sip
Expand Down Expand Up @@ -107,7 +107,6 @@ def _isdeleted(obj):
_to_int = int
else:
raise AssertionError(f"Unexpected QT_API: {QT_API}")
_getSaveFileName = QtWidgets.QFileDialog.getSaveFileName


if QT_API in [QT_API_PYQT6, QT_API_PYQT5, QT_API_PYSIDE6, QT_API_PYSIDE2]:
Expand Down
0