Skip to content

Commit

Permalink
Updated getSaveFileDialog calls to use matplotlib's compatibility shim.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeitan authored and stefanv committed Jun 26, 2018
1 parent 634fffa commit c2559de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions viscm/gui.py
Expand Up @@ -15,7 +15,7 @@
#matplotlib.rcParams['backend'] = "QT4AGG"
# Do this first before any other matplotlib imports, to force matplotlib to
# use a Qt backend
from matplotlib.backends.qt_compat import QtWidgets, QtCore, QtGui
from matplotlib.backends.qt_compat import QtWidgets, QtCore, QtGui, _getSaveFileName
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas4
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas5

Expand Down Expand Up @@ -1103,7 +1103,7 @@ def closeEvent(self, ce):
self.fileQuit()

def save(self):
fileName = QtWidgets.QFileDialog.getSaveFileName(
fileName, _ = _getSaveFileName(
caption="Save file",
directory=self.cmapname + ".png",
filter="Image Files (*.png *.jpg *.bmp)")
Expand Down Expand Up @@ -1292,7 +1292,7 @@ def set_remove_mode(self):
self.viscm_editor.bezier_builder.mode = "remove"

def export(self):
fileName = QtWidgets.QFileDialog.getSaveFileName(
fileName, _ = _getSaveFileName(
caption="Export file",
directory=self.viscm_editor.name + ".py",
filter=".py (*.py)")
Expand All @@ -1305,7 +1305,7 @@ def closeEvent(self, ce):
self.fileQuit()

def save(self):
fileName = QtWidgets.QFileDialog.getSaveFileName(
fileName, _ = _getSaveFileName(
caption="Save file",
directory=self.viscm_editor.name + ".jscm",
filter="JSCM Files (*.jscm)")
Expand Down

0 comments on commit c2559de

Please sign in to comment.