Use the new layer resize function in brush preview
Fix sublayer merging.

Don't merge hidden sublayers