dpwrussell/openmicroscopy — pull request #3 by will-moore (2014-10-14 09:24:26+00:00)
Title: Fix thumbnail selection sync after filtering

Hi Douglas, this fixes the sync of selection from thumbnails to jsTree after filtering.

- I renamed the existing ```syncTreeSelection()``` function to ```syncSiblingSelection()``` to reflect that it was based on an imageId, and now it only gets called ONCE by a new syncTreeSelection() method. Previously, on drag selection ```stop``` the old syncTreeSelection() was getting called multiple times which wasn't necessary.

- Now, after we've filtered by text field, ```deselectFilteredFromTree()``` simply de-selects hidden thumbnails and calls syncTreeSelection().

- The only thing that is still broken is if the filter hides ALL selected thumbnails. Then, nothing is selected in the jsTree and the whole centre panel is emptied. So you can't undo the filter etc.