Skip to content

Commit

Permalink
Merge pull request #2665 from freakboy3742/winforms-test-error
Browse files Browse the repository at this point in the history
Catch an error that is reported, but silently ignored during CI testing
  • Loading branch information
mhsmith authored Jun 19, 2024
2 parents f90ab92 + fac654a commit 9a7b2bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions changes/2665.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
An error raised and ignored during testbed testing on Winforms was silenced.
12 changes: 7 additions & 5 deletions winforms/src/toga_winforms/widgets/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,13 @@ def text(attr):
[text(attr) for attr in self._accessors],
)

# TODO: ListView only has built-in support for one icon per row. One possible
# workaround is in https://stackoverflow.com/a/46128593.
icon = icon(self._accessors[0])
if icon is not None:
lvi.ImageIndex = self._image_index(icon)
# If the table has accessors, populate the icons for the table.
if self._accessors:
# TODO: ListView only has built-in support for one icon per row. One possible
# workaround is in https://stackoverflow.com/a/46128593.
icon = icon(self._accessors[0])
if icon is not None:
lvi.ImageIndex = self._image_index(icon)

return lvi

Expand Down

0 comments on commit 9a7b2bf

Please sign in to comment.