cappuccino/cappuccino — pull request #1854 by cacaodev (2013-03-14 11:27:50+00:00)
Title: CPTableView: fix for #1337

Some info if you started looking into that.

When the user clicked a sortable column, we were selecting/deselecting twice: A/ selecting the column directly in CPTableView and B/ selecting a row via the sortDescriptors binding -> CPArrayController setSortDescriptors -> CPArrayController setSelectionIndexes -> CPTableView _setSelectedRows:

This commit just reverts A/ and B/ but there are 2 underlying bugs:
1/ We should select the column only once and skip B/. We may need a CPTableSortDescriptors binder subclass for that to update the sortDescriptors property only.
2/ When the CPArrayController selectionIndexes updates the selected rows in the CPTableView via _setSelectedRows:, a selected column is not deselected. (1 would hide 2).

These 2 bugs can be fixed later independently and won't conflict with this fix.