Skip to content

Show partial relation memberships in multiselection#12018

Open
Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Shyam-123pandey:fix-9198
Open

Show partial relation memberships in multiselection#12018
Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Shyam-123pandey:fix-9198

Conversation

@Shyam-123pandey
Copy link

Mergin.fix.mp4

Currently, when multiple features are selected, the relation panel only shows relations shared by all selected entities. This hides relations that belong to only some of the selected features.
This PR changes the logic to collect the union of parent relations instead of the intersection, so all relation memberships are shown in the panel.
I also updated the relation count so it correctly reflects the number of displayed relations.
Example
Before:
Way A → R1
Way B → R2

Multiselect → Relations (0)

After:
Way A → R1
Way B → R2

Multiselect → Relations (no of relations) showing R1 and R2
Tested locally using real data with roads belonging to different bus route relations.
And at the bottom add:
Fixes #9198

Copilot AI review requested due to automatic review settings March 15, 2026 16:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the raw membership editor UI logic to compute parent relations across selected entities using a union of all parent relations instead of only the shared/intersected ones, affecting what relations appear and how they’re counted/displayed.

Changes:

  • Replaced shared-parent (intersection) relation gathering with a new getAllParentRelations() implementation (union + dedupe by relation id).
  • Updated the section label count and membership list generation to use the new parent relation gathering logic.

You can also share your feedback on Copilot code review. Take the survey.

@Shyam-123pandey
Copy link
Author

Please review this PR @tyrasd .

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.

multiselection doesn't show all relation memberships

2 participants