- Sector Color Picker: fixed a problem where the dialog could not be closed using the "enter" or "ESC" buttons

- Light/Sector Color Picker: fixed a problem where closing the dialog would result in a flicker
- Light Color Picker: fixed a problem where canceling the dialog would not revert the color settings
This commit is contained in:
biwa 2022-08-23 14:41:03 +02:00
parent 6b0b047c57
commit bacaff5b6b
3 changed files with 3 additions and 9 deletions

View file

@ -172,11 +172,6 @@ namespace CodeImp.DoomBuilder.ColorPicker
deselectelement.Selected = false;
}
}
else
{
form.Dispose();
form = null;
}
General.Interface.RedrawDisplay();
}
@ -184,8 +179,6 @@ namespace CodeImp.DoomBuilder.ColorPicker
private void form_FormClosed(object sender, FormClosedEventArgs e)
{
formLocation = form.Location;
form.Dispose();
form = null;
}
}
}

View file

@ -323,8 +323,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
{
General.Map.UndoRedo.CreateUndo(description);
//tricky way to actually store undo information...
foreach(Thing t in selection) t.Move(t.Position);
foreach (Thing t in selection) t.Fields.BeforeFieldsChange();
}
//this is called only once

View file

@ -97,6 +97,8 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
rbSectorColor.CheckedChanged += rbColor_CheckedChanged;
rbFadeColor.CheckedChanged += rbColor_CheckedChanged;
this.AcceptButton = colorPickerControl1.OkButton;
this.CancelButton = colorPickerControl1.CancelButton;
Text = "Editing " + rest;
//cannot fail here :)