fixed bug in shapewidget (could not restore opacity to 1.0)

Bug : change the opacity of a shape from 1.0 to 0.5 , it works. Change it from 0.5 to 0.8, it works. Change it back to 1.0, it does not work -- because the current code *never* writes the attribute with value 1.0.

The rationale is probably that 1.0 is the default value anyway, but you can't rely on the default value if the attribute is present. An alternative would be simply remove the attribute when value is 1.0.