Permalink
Browse files

convert QString to string, and fix string.replace() oops

  • Loading branch information...
1 parent 3983e93 commit 16dd72999a9678d851663d63f864982248da72b8 @mspacek committed May 30, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/matplotlib/backends/backend_qt.py
  2. +2 −2 lib/matplotlib/backends/backend_qt4.py
@@ -419,8 +419,8 @@ def save_figure(self, *args):
sorted_filetypes = filetypes.items()
sorted_filetypes.sort()
default_filetype = self.canvas.get_default_filetype()
- default_filename = self.canvas.window().windowTitle() or 'image'
- default_filename.replace(' ', '_')
+ default_filename = str(self.canvas.window().windowTitle()) or 'image'
+ default_filename = default_filename.replace(' ', '_')
start = default_filename + '.' + default_filetype
filters = []
@@ -614,8 +614,8 @@ def save_figure(self, *args):
sorted_filetypes = filetypes.items()
sorted_filetypes.sort()
default_filetype = self.canvas.get_default_filetype()
- default_filename = self.canvas.window().windowTitle() or 'image'
- default_filename.replace(' ', '_')
+ default_filename = str(self.canvas.window().windowTitle()) or 'image'
+ default_filename = default_filename.replace(' ', '_')
start = default_filename + '.' + default_filetype
filters = []

0 comments on commit 16dd729

Please sign in to comment.