Use selection priority in double-click selection logic. Fixes #4053.
Merge pull request #4096 from pchote/selection-priority

Use selection priority in double-click selection logic. Fixes #4053.