Fix flowchart s&l on python2

This commit is contained in:
duguxy 2015-09-18 19:53:09 +08:00
parent eb55e439a3
commit 9fa0d0e724

View File

@ -515,6 +515,7 @@ class Flowchart(Node):
return
## NOTE: was previously using a real widget for the file dialog's parent, but this caused weird mouse event bugs..
#fileName = QtGui.QFileDialog.getOpenFileName(None, "Load Flowchart..", startDir, "Flowchart (*.fc)")
fileName = asUnicode(fileName)
state = configfile.readConfigFile(fileName)
self.restoreState(state, clear=True)
self.viewBox.autoRange()
@ -537,6 +538,7 @@ class Flowchart(Node):
#fileName = QtGui.QFileDialog.getSaveFileName(None, "Save Flowchart..", startDir, "Flowchart (*.fc)")
if not fileName.endswith('.fc'):
fileName += '.fc'
fileName = asUnicode(fileName)
configfile.writeConfigFile(self.saveState(), fileName)
self.sigFileSaved.emit(fileName)