jashkenas/backbone — pull request #2759 by zakjan (2013-09-13 19:25:38+00:00)
Title: Resort collection on model change

When a model is changed via set method, collection needed to be sorted manually.
If collection has comparator, it makes more sense to have automatic resorting capability in every possible case than to don't have it.

This pull request adds automatic resorting to collection._onModelChange, when it is triggered by change event.
Sorting can be prevented manually by `{sort:false}` option.

Fixes #689

If performance is issue, like when making multiple changes in a row, automatic sorting can be prevented and then triggered manually.