Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeWidget: Ensure globalSelection is correctly set when opening context menu #13710

Merged
merged 4 commits into from
May 15, 2024

Conversation

jonah-iden
Copy link
Contributor

@jonah-iden jonah-iden commented May 14, 2024

What it does

Closes #12937

This ensures the globalSelection is set correctly when focusing a tree widget. There are cases where when restoring the layout the global selection is not set because the widget is not yet active and when opening the context menu there is no selection changed event so the global selection stays at the old value. See the linked issue

How to test

Taken from the linked issue

  1. Open a file
  2. Click in the Navigator to give it focus (this is actually optional as long as the navigator is open)
  3. Reload the window
  4. Open the context menu for the already preselected file in the navigator widget

Follow-ups

Review checklist

Reminder for reviewers

…ext menu

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden requested a review from msujew May 14, 2024 12:35
@jonah-iden jonah-iden changed the title TreeWidget: Ensure globalSelection is correctly set when opening cont… TreeWidget: Ensure globalSelection is correctly set when opening context menu May 14, 2024
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden requested a review from msujew May 14, 2024 13:07
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jonah-iden jonah-iden merged commit cb2bd96 into master May 15, 2024
14 checks passed
@jonah-iden jonah-iden deleted the jiden/treeensure-global-selection-correct branch May 15, 2024 06:23
@github-actions github-actions bot added this to the 1.50.0 milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Navigator shows wrong context menu entries when the application is started with open file(s)
2 participants