Skip to content

Commit ed335cf

Browse files
authored
bpo-39600, IDLE: Remove duplicated font names (GH-18430)
In the font configuration window, remove duplicated font names.
1 parent e00c1d0 commit ed335cf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Lib/idlelib/configdialog.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,9 @@ def load_font_cfg(self):
607607
font_bold = configured_font[2]=='bold'
608608

609609
# Set editor font selection list and font_name.
610-
fonts = list(tkFont.families(self))
611-
fonts.sort()
610+
fonts = tkFont.families(self)
611+
# remove duplicated names and sort
612+
fonts = sorted(set(fonts))
612613
for font in fonts:
613614
self.fontlist.insert(END, font)
614615
self.font_name.set(font_name)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
In the font configuration window, remove duplicated font names.

0 commit comments

Comments
 (0)