Fix file selection dialogs not choosing the correct file extension filter by default

This commit is contained in:
Kovid Goyal 2009-07-26 11:44:01 -06:00
parent fa603d130c
commit 0b4d97a8a4

View File

@ -342,6 +342,8 @@ class FileDialog(QObject):
ftext += '%s (%s);;'%(text, ' '.join(extensions))
if add_all_files_filter or not ftext:
ftext += 'All files (*)'
if ftext.endswith(';;'):
ftext = ftext[:-2]
self.dialog_name = name if name else 'dialog_' + title
self.selected_files = None