Correct problems of selection - mainly visible with thumbnails view

When we select an item in thumbnail view the unselect doesn't work, and the buton to download files isn't desactivated which when we click on show an error page of emtpy item list to download. Also this patch correct when we want to unselect with a second click an item wasn't unselected this is working now.

Warning this patch wasn't tested with current version (current bug version 2.1.0), but the code of the method didn't change since this version.