Skip to content

gtktreeview: Fix selection changed signal for GTK_SELECTION_MULTIPLE.

Do not emit a selection "changed" signal when selecting already selected rows in GTK_SELECTION_MULTIPLE mode.

This fixes both normal left click of an already selected row (if this is the only row selected) and SHIFT + left clicking an already selected selection.

Everything is modeled after the existing code to reduce the chance of introducing any regressions. This patch makes sure to only mark the selection as dirty when it actually is.

I have extensively tested the code with a path depth of 1 and more. Happy for any feedback.

Fixes #5314 for gtk4.

Merge request reports