mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 06:02:11 +00:00
Fixed, Linedef Color Presets window: Linedef Actions and Linedef Activations lists were accidentally modified during window initialization.
This commit is contained in:
parent
f452fca58c
commit
e62da4e6b2
1 changed files with 10 additions and 11 deletions
|
@ -84,9 +84,8 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
// Fill actions list
|
// Fill actions list
|
||||||
action.GeneralizedCategories = General.Map.Config.GenActionCategories;
|
action.GeneralizedCategories = General.Map.Config.GenActionCategories;
|
||||||
|
|
||||||
LinedefActionInfo anyAction = new LinedefActionInfo(-1, "Any action", true, false);
|
List<LinedefActionInfo> infos = new List<LinedefActionInfo> { new LinedefActionInfo(-1, "Any action", true, false) };
|
||||||
List<LinedefActionInfo> infos = General.Map.Config.SortedLinedefActions;
|
infos.AddRange(General.Map.Config.SortedLinedefActions);
|
||||||
infos.Insert(0, anyAction);
|
|
||||||
|
|
||||||
action.AddInfo(infos.ToArray());
|
action.AddInfo(infos.ToArray());
|
||||||
action.Value = -1;
|
action.Value = -1;
|
||||||
|
@ -96,7 +95,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
activation.Visible = !General.Map.UDMF;
|
activation.Visible = !General.Map.UDMF;
|
||||||
|
|
||||||
//get activates
|
//get activates
|
||||||
List<LinedefActivateInfo> activations = General.Map.Config.LinedefActivates;
|
List<LinedefActivateInfo> activations = new List<LinedefActivateInfo>(General.Map.Config.LinedefActivates);
|
||||||
|
|
||||||
if(activations.Count > 0)
|
if(activations.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -159,12 +158,12 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
if(other.Preset.Flags.Count != item.Preset.Flags.Count) continue;
|
if(other.Preset.Flags.Count != item.Preset.Flags.Count) continue;
|
||||||
if(other.Preset.RestrictedFlags.Count != item.Preset.RestrictedFlags.Count) continue;
|
if(other.Preset.RestrictedFlags.Count != item.Preset.RestrictedFlags.Count) continue;
|
||||||
|
|
||||||
bool gotMismatch = false;
|
bool gotmismatch = false;
|
||||||
foreach(string flag in other.Preset.Flags)
|
foreach(string flag in other.Preset.Flags)
|
||||||
{
|
{
|
||||||
if(!item.Preset.Flags.Contains(flag))
|
if(!item.Preset.Flags.Contains(flag))
|
||||||
{
|
{
|
||||||
gotMismatch = true;
|
gotmismatch = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,12 +172,12 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
{
|
{
|
||||||
if(!item.Preset.RestrictedFlags.Contains(flag))
|
if(!item.Preset.RestrictedFlags.Contains(flag))
|
||||||
{
|
{
|
||||||
gotMismatch = true;
|
gotmismatch = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gotMismatch) continue;
|
if(gotmismatch) continue;
|
||||||
|
|
||||||
//we have a match
|
//we have a match
|
||||||
warning = "Preset matches '" + other.Preset.Name + "'!";
|
warning = "Preset matches '" + other.Preset.Name + "'!";
|
||||||
|
|
Loading…
Reference in a new issue