More flexible deselection handling after actions

Check the comment for 103079c.

`globalSettings` is just awesome and a joy to use.