Permalink
Browse files

fix qt4 not using get_default_filename in save_figure

restore enforcing lowercase in get_default_filename
  • Loading branch information...
1 parent f60f942 commit c090a9c17b9c00594e93555b484ea2e4c32fab96 @mspacek committed Jun 1, 2012
Showing with 2 additions and 4 deletions.
  1. +1 −1 lib/matplotlib/backend_bases.py
  2. +1 −3 lib/matplotlib/backends/backend_qt4.py
View
2 lib/matplotlib/backend_bases.py
@@ -2114,7 +2114,7 @@ def get_default_filename(self):
a default filename.
"""
default_filename = self.get_window_title() or 'image'
- default_filename = default_filename.replace(' ', '_')
+ default_filename = default_filename.lower().replace(' ', '_')
return default_filename + '.' + self.get_default_filetype()
def switch_backends(self, FigureCanvasClass):
View
4 lib/matplotlib/backends/backend_qt4.py
@@ -617,10 +617,8 @@ def save_figure(self, *args):
sorted_filetypes = filetypes.items()
sorted_filetypes.sort()
default_filetype = self.canvas.get_default_filetype()
- default_filename = self.canvas.get_window_title() or 'image'
- default_filename = default_filename.replace(' ', '_')
- start = default_filename + '.' + default_filetype
+ start = self.canvas.get_default_filename()
filters = []
selectedFilter = None
for name, exts in sorted_filetypes:

0 comments on commit c090a9c

Please sign in to comment.