Fix for file types conversion. Must not have ';;' on the end of the last item.

This commit is contained in:
MikeTheWatchGuy 2019-08-29 14:36:10 -04:00
parent d48b444734
commit 1d193651fe
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3 #!/usr/bin/python3
version = __version__ = "0.28.0.1 Unreleased PEP8-ifed" version = __version__ = "0.28.0.2 Unreleased PEP8-ifed"
import sys import sys
import types import types
@ -3792,8 +3792,8 @@ def _convert_tkinter_size_to_Qt(size, scaling=DEFAULT_PIXELS_TO_CHARS_SCALING, h
# =========================================================================== # # =========================================================================== #
def convert_tkinter_filetypes_to_qt(filetypes): def convert_tkinter_filetypes_to_qt(filetypes):
qt_filetypes = '' qt_filetypes = ''
for item in filetypes: for i, item in enumerate(filetypes):
filetype = item[0] + ' (' + item[1] + ');;' filetype = item[0] + ' (' + item[1] + ')' + (';;' if i != len(filetypes)-1 else '')
qt_filetypes += filetype qt_filetypes += filetype
return qt_filetypes return qt_filetypes