project_panel: Reuse `index_for_entry` in `index_for_selection` (#35034)

Just refactor I came across while working on another issue.
`index_for_entry` and `index_for_selection` have the exact same logic,
here we can simply reuse `index_for_entry` for `index_for_selection`.

Release Notes:

- N/A
fa788a39a4Smit Barmase committed on 7/24/2025, 2:37:38 PM· committed by GitHubparent7cdd808
1 file changedLine totals unavailable