Layers/Objects dialog: multiple selection with shift selects filtered out objects

Steps to reproduce:

  • open Inkscape
  • open or create a document with many objects
  • open the layers/objects dialog
  • use a filter in the list (search)
  • select one remaining item then shift select another one (where there would be some filtered out items in between)

What happened?

  • all items between the 2 selected ones get selected

What should have happened?

  • only the filtered/visible ones should be selected

Inkscape Version and Operating System:

  • Inkscape Version: Inkscape 1.3-alpha (1:1.2.0-alpha1+devel+202305071223+5991b5bb)
  • Operating System: Ubuntu
  • Operating System version: 23.04