adobe/brackets — pull request #4523 by peterflynn (2013-07-19 23:45:03+00:00)
Title: Alternate fix for #4484 (Working set broken after Save As / save untitled outside project)

Alternate fix for #4484:
* addToWorkingSet() ensures item is moved to requested index, even if it was already in the working set at some other index
* Add a force flag, so we can guarantee a redraw after suppressing it during removal earlier
* addToWorkingSet() _always_ dispatches "workingSetAdd" if something was added to the list -- WorkingSetView now decides internally how big a refresh is needed, rather than addToWorkingSet() dictating it. Insertion index is now passed with the event to aid this.
* Call handleFileAddToWorkingSet() directly from _doSaveAs() to simplify plumbing (no advantage to going through FileViewController now that "workingSetAdd" is consistently fired for additions).
* Includes unit test from PR #4479

@bchintx Let me know what you think of this approach. If it seems reasonable, do you want to close the other one?