Skip to content

Let the image list select more than one row - #71

Merged
Menelion merged 2 commits into
masterfrom
multi-select
Sep 8, 2026
Merged

Let the image list select more than one row#71
Menelion merged 2 commits into
masterfrom
multi-select

Conversation

@Menelion

@Menelion Menelion commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

"Convert Selected" against a single-select list was a contradiction — and the code had noticed before anyone did. ConvertSelectedMenuItem_Click already collected every selected index and handed the whole list to ConvertItemsAsync. It has been converting exactly one image for as long as it existed, because the control could never offer it a second.

The list is now multi-select, and the handlers written for a single row are told which row they mean.

What changed

Remove takes every selected image rather than the first, walking indices in descending order so removing one cannot shift another still to go. Afterwards it lands the selection where the first removed row used to be — a list with nothing selected announces nothing when focus returns to it, so ending up somewhere is not cosmetic.

Create Multi-size ICO and Fit to File Size each make one output from one image, so they act on the focused row rather than silently taking the topmost of a multiple selection, which would work on an image the user is not looking at.

The preview follows the focused row for the same reason: extending a selection downward should show where you are, not where you started.

Convert Selected needed no change at all — it was already written for this.

Verification

At the window level rather than through the property:

MultiSelect property : True
LVS_SINGLESEL set    : False   (must be False)
rows selected        : 2       (must be 2)

On the accessibility of it

Multiple selection was tested by ear on JAWS, NVDA and Narrator before this was written. Extending a selection, moving the focus without extending it, and selecting everything at once are all announced correctly.

The one shortfall is that no reader names the mode for a list view the way it says "multi select list box". That appears to be decided by control class rather than by anything the control reports — a multi-select list view, a single-select one and a multi-select list box all measured identical MSAA state. Behaviour is announced; the label is not.

https://claude.ai/code/session_01TJ8i7jHmkUjVCjVccLp6Hf

Convert Selected against a single-select list was a contradiction, and the
code had noticed before anyone did: ConvertSelectedMenuItem_Click already
collected every selected index and handed the whole list to
ConvertItemsAsync. It had been converting exactly one image for as long as
it existed, because the control could not offer it a second.

So the list is multi-select now, and the handlers that were written for one
row are told which row they mean.

Remove takes every selected image rather than the first, walking the
indices in descending order so removing one cannot shift another still to
go, and afterwards lands the selection where the first removed row used to
be. A list with nothing selected announces nothing when focus returns to
it, so ending up somewhere is not cosmetic.

Create Multi-size ICO and Fit to File Size both make one output from one
image, so they act on the focused row rather than silently taking the
topmost of a multiple selection - which would work on an image the user is
not looking at.

The preview follows the focused row too, for the same reason: extending a
selection downward should show where you are rather than where you started.

Verified at the window level rather than through the property: the list
window carries no LVS_SINGLESEL, and selecting two rows yields two.

Screen readers announce multiple selection well - extending, moving the
focus without extending, and selecting everything at once all come across
on JAWS, NVDA and Narrator. The one gap is that none of them names the mode
for a list view the way they say "multi select list box", which appears to
be decided by control class rather than by anything the control reports.

Claude-Session: https://claude.ai/code/session_01TJ8i7jHmkUjVCjVccLp6Hf
@Menelion
Menelion merged commit a19fa7d into master Sep 8, 2026
1 check passed
@Menelion
Menelion deleted the multi-select branch September 8, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant