mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Fixed, Edit Things window: thing type validation when editing multiple thing types was broken in r2527.
This commit is contained in:
parent
73f650bf64
commit
503ce1bfaf
2 changed files with 12 additions and 9 deletions
|
@ -391,7 +391,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
|
||||
// Verify the type
|
||||
if(((thingtype.GetFullType(0) < General.Map.FormatInterface.MinThingType) || (thingtype.GetFullType(0) > General.Map.FormatInterface.MaxThingType)))
|
||||
if(!string.IsNullOrEmpty(thingtype.TypeStringValue) && ((thingtype.GetFullType(0) < General.Map.FormatInterface.MinThingType) || (thingtype.GetFullType(0) > General.Map.FormatInterface.MaxThingType)))
|
||||
{
|
||||
General.ShowWarningMessage("Thing type must be between " + General.Map.FormatInterface.MinThingType + " and " + General.Map.FormatInterface.MaxThingType + ".", MessageBoxButtons.OK);
|
||||
return;
|
||||
|
@ -621,12 +621,14 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
action_ValueChanges(this, EventArgs.Empty);
|
||||
|
||||
//mxd. Update things
|
||||
if(preventchanges) return;
|
||||
MakeUndo(); //mxd
|
||||
|
||||
if(((thingtype.GetResult(0) < General.Map.FormatInterface.MinThingType) || (thingtype.GetResult(0) > General.Map.FormatInterface.MaxThingType)))
|
||||
if(preventchanges ||
|
||||
(!string.IsNullOrEmpty(thingtype.TypeStringValue) &&
|
||||
thingtype.GetResult(0) < General.Map.FormatInterface.MinThingType
|
||||
|| thingtype.GetResult(0) > General.Map.FormatInterface.MaxThingType))
|
||||
return;
|
||||
|
||||
MakeUndo(); //mxd
|
||||
|
||||
foreach(Thing t in things)
|
||||
{
|
||||
//Set type
|
||||
|
|
|
@ -442,7 +442,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
|
||||
// Verify the type
|
||||
if(((thingtype.GetResult(0) < General.Map.FormatInterface.MinThingType) || (thingtype.GetResult(0) > General.Map.FormatInterface.MaxThingType)))
|
||||
if(!string.IsNullOrEmpty(thingtype.TypeStringValue) && ((thingtype.GetResult(0) < General.Map.FormatInterface.MinThingType) || (thingtype.GetResult(0) > General.Map.FormatInterface.MaxThingType)))
|
||||
{
|
||||
General.ShowWarningMessage("Thing type must be between " + General.Map.FormatInterface.MinThingType + " and " + General.Map.FormatInterface.MaxThingType + ".", MessageBoxButtons.OK);
|
||||
return;
|
||||
|
@ -684,9 +684,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
action_ValueChanges(this, EventArgs.Empty);
|
||||
|
||||
//mxd. Update things
|
||||
if(preventchanges
|
||||
|| (thingtype.GetResult(0) < General.Map.FormatInterface.MinThingType)
|
||||
|| (thingtype.GetResult(0) > General.Map.FormatInterface.MaxThingType))
|
||||
if(preventchanges ||
|
||||
(!string.IsNullOrEmpty(thingtype.TypeStringValue) &&
|
||||
thingtype.GetResult(0) < General.Map.FormatInterface.MinThingType
|
||||
|| thingtype.GetResult(0) > General.Map.FormatInterface.MaxThingType))
|
||||
return;
|
||||
|
||||
MakeUndo(); //mxd
|
||||
|
|
Loading…
Reference in a new issue