Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Opening a non-working-set file doesn't select it in tree if a folder was selected before #1280

Closed
peterflynn opened this issue Jul 19, 2012 · 3 comments · Fixed by #1290
Closed

Comments

@peterflynn
Copy link
Member

  1. Select a folder in the project tree (not a file)
  2. Do a 'find across files'
  3. Make sure one of the files in the results list is visible in your project tree (parent folder is expanded), and is not in the working set
  4. Click one of the results in that file

(You can also repro this by clicking the header link in inline editors, or by using File > Open)

Result: Folder remains selected in project tree. No selection highlight shown for the file that you just opened.

Expected: Selection highlight moves to the file you just opened.

This is a regression from the #1117 fix (pull #1269).

@ghost ghost assigned tvoliter Jul 19, 2012
@peterflynn
Copy link
Member Author

@tvoliter, looks like this comes from the new if (selected && selected.isDirectory) check in ProjectManager. I wonder if we could replace that with a a flag so that we just ignore "documentSelectionFocusChange" events while calling setFileSelectionFocus(). (Since the goal of that call is only to notify WorkingSetView, not the project tree that has already responded to the click).

This isn't that easy to hit, but I preliminarily tagged it Sprint 11 since it's a regression (afaict).

redmunds added a commit that referenced this issue Jul 21, 2012
Correctly handle focus changes between working set and file tree when activating document from find in filesfixes #1280
@peterflynn peterflynn reopened this Jul 21, 2012
@peterflynn
Copy link
Member Author

Ugh, Github again.... reopening to actually verify it

@ghost ghost assigned peterflynn Jul 21, 2012
@peterflynn
Copy link
Member Author

Confirmed fixed

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
2 participants