BUG-1753: Fixing problems with saving/loading the configuration of the DropShadowEffect and TornEdgeEffect

This commit is contained in:
Robin 2015-02-19 13:04:50 +01:00
commit 3adb9278d0
2 changed files with 18 additions and 4 deletions

View file

@ -36,7 +36,8 @@ namespace Greenshot.Forms {
private void ShowSettings() {
shadowCheckbox.Checked = effect.GenerateShadow;
shadowDarkness.Value = (int)(effect.Darkness * 40);
// Fix to prevent BUG-1753
shadowDarkness.Value = Math.Max(shadowDarkness.Minimum, Math.Min(shadowDarkness.Maximum, (int)(effect.Darkness * shadowDarkness.Maximum)));
offsetX.Value = effect.ShadowOffset.X;
offsetY.Value = effect.ShadowOffset.Y;
toothsize.Value = effect.ToothHeight;