From 473b16d04dfca90b763e41506dbeac328eaa68de Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 10 Feb 2020 18:24:10 -0500 Subject: [PATCH] bpo-39600: Adjust code, add idlelib/NEWS item Complete previous patch. --- Lib/idlelib/NEWS.txt | 2 ++ Lib/idlelib/configdialog.py | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index d57ba7e6bac908..838120964b2d89 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ Released on 2020-10-05? ====================================== +bpo-39600: Remove duplicate font names from configuration list. + bpo-38792: Close a shell calltip if a :exc:`KeyboardInterrupt` or shell restart occurs. Patch by Zackery Spytz. diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index 7b844f00e7736d..9d5c2cde04b240 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -606,10 +606,8 @@ def load_font_cfg(self): font_size = configured_font[1] font_bold = configured_font[2]=='bold' - # Set editor font selection list and font_name. - fonts = tkFont.families(self) - # remove duplicated names and sort - fonts = sorted(set(fonts)) + # Set sorted no-duplicate editor font selection list and font_name. + fonts = sorted(set(tkFont.families(self))) for font in fonts: self.fontlist.insert(END, font) self.font_name.set(font_name)