Fixed a problem where custom boolean UDMF fields could not set be to false

This commit is contained in:
biwa 2020-12-28 20:22:04 +01:00
parent 2945ca24cd
commit 9090642d4e

View file

@ -260,12 +260,12 @@ namespace CodeImp.DoomBuilder.Controls
// This defines the field
public void Define(object value)
{
//mxd. Don't count as defined when default value is passed
if(value.ToString() == fieldtype.GetDefaultValue().ToString()) return;
// Now defined
fieldtype.SetValue(value);
this.Cells[2].Value = fieldtype.GetStringValue();
//mxd. Don't count as defined when default value is passed
if (value.ToString() == fieldtype.GetDefaultValue().ToString()) return;
this.DefaultCellStyle.ForeColor = (rowtype == FieldsEditorRowType.USERVAR ? SystemColors.HotTrack : SystemColors.WindowText);
isdefined = true;
}