Select a style's layer in the MapEditor.

Now creating a datasource from selection in the MapEditor works even when a style is selected in the TOC.

Fixes #514.