private void UpdateOpacity()
{
//TODO check redraws are being throttled.
opacity = opacitySpinner.Value / 100d;
PintaCore.Layers.CurrentLayer.Opacity = opacity;
if (PintaCore.Layers.SelectionLayer != null) {
//Update Opacity for SelectionLayer and force redraw
PintaCore.Layers.SelectionLayer.Opacity = PintaCore.Layers.CurrentLayer.Opacity;
}
PintaCore.Workspace.Invalidate ();
}