Skip to content

Commit

Permalink
Fix #1375: Remove some nonsensical wrap code
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Sep 20, 2021
1 parent 0f9229e commit 066a24c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/app/selector_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -1305,12 +1305,7 @@ def sel_item_id(self, it_id: str) -> bool:

def sel_item(self, item: Item, event: Event = None) -> None:
"""Select the specified item."""
# If this is immediately set, it sometimes acts like the label is 1 wide.
# Instead set it to a single character, and delay the actual setting.
self.prop_name['text'] = ''
self.prop_name.update()
self.prop_name.after_idle(lambda: self.prop_name.configure(text=item.longName))

self.prop_name['text'] = item.longName
if len(item.authors) == 0:
self.prop_author['text'] = ''
else:
Expand Down Expand Up @@ -1543,9 +1538,6 @@ def flow_items(self, _: Event = None) -> None:
"""
self.pal_frame.update_idletasks()
self.pal_frame['width'] = self.wid_canvas.winfo_width()
self.prop_name['wraplength'] = self.prop_desc.winfo_width()
if self.desc_label is not None:
self.desc_label['wraplength'] = self.win.winfo_width()

width = (self.wid_canvas.winfo_width() - 10) // ITEM_WIDTH
if width < 1:
Expand Down

0 comments on commit 066a24c

Please sign in to comment.