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

Correctly handle focus changes between working set and file tree when activating document from find in filesfixes #1280 #1290

Merged
merged 3 commits into from
Jul 21, 2012

Conversation

tvoliter
Copy link
Contributor

fixes #1280. Send a different type of notification from FileViewController when only the focus has changed so that the working set and file tree redraw without assuming a document change notification

@ghost ghost assigned redmunds Jul 21, 2012
@redmunds
Copy link
Contributor

reviewing

@@ -355,6 +361,8 @@ define(function (require, exports, module) {
_handleDocumentSelectionChange();
_fireSelectionChanged();
});

$(FileViewController).on("fileViewFocusChange", _updateListSelection);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems inconsistent that the fileViewFocusChange event calls _updateListSelection() directly, and the documentSelectionFocusChange event calls _handleDocumentSelectionChange() (which simply call _updateListSelection()). I think it would be easier to understand this code if both events called the same function. Can we get rid of the _handleDocumentSelectionChange() function?

Copy link
Contributor

Choose a reason for hiding this comment

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

Another option is to move the call to _fireSelectionChanged() into the _handleDocumentSelectionChange() function to make the event binding cleaner,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes pushed

redmunds added a commit that referenced this pull request Jul 21, 2012
Correctly handle focus changes between working set and file tree when activating document from find in filesfixes #1280
@redmunds redmunds merged commit a90d7c2 into master Jul 21, 2012
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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