Script authors: hasSelectedItems is going to be removed!

Hey everybody, this is another heads-up topic about a script change that is going to happen.

As previously announced, the method W.selectionManager.hasSelectedItems() that can be used to check whether there are any selected items will be removed as it is replaced with the method W.selectionManager.hasSelectedFeatures(). Replacing this should be very straightforward.
The WME has been adjusted to include a deprecation message in the logs each time this method is still used, which should aid figuring out whether your script(s) still need changes or not.

I went through a list of userscripts I have loaded locally and found only two scripts affected: Street Vector Layer and WME MagicWand. I’ll notify the authors of these scripts myself as well. I only went through a select list of scripts though, so please do check whether any of your scripts contain this reference.

Just a note: the deprecation message for W.selectionManger.hasSelectedItems was added earlier this year in preparation for the change to W.selectionManager.hasSelectedFeatures. Most scripts should already be updated to the new method so the actual remove of W.selectionManger.hasSelectedItems should only affect abandoned scripts/scripts not updated in the previous 5 months.

Hmm, true. I guess this change isn’t really all that interesting then…