Shape style fixes

My previous PR introduced the style property for the shape. 
After using them I realized that sometimes the viewer loses the shape.style property because the shape transformation functions create a new shape object but the style does not get transferred.

I introduce this PR for the transformations not to lose the style. (And remove a compiler warning)