mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-01-31 13:10:33 +00:00
If multiple Things/linedefs of different types are selected, show generic flag names
This commit is contained in:
parent
1e366ff36e
commit
984c021fe0
2 changed files with 20 additions and 11 deletions
|
@ -177,7 +177,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Flags
|
||||
LinedefActionInfo li = General.Map.Config.GetLinedefActionInfo(fl.Action);
|
||||
IDictionary<string, string> newFlags = (li == null || li.Flags.Count == 0) ? General.Map.Config.LinedefFlags : li.Flags;
|
||||
flags.UpdateCheckboxes(newFlags);
|
||||
|
||||
foreach (CheckBox c in flags.Checkboxes)
|
||||
if(fl.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fl.Flags[c.Tag.ToString()];
|
||||
|
@ -228,15 +227,19 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
backTextureOffset.SetValues(fl.Back.OffsetX, fl.Back.OffsetY, true); //mxd
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Now go for all lines and change the options when a setting is different
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Now go for all lines and change the options when a setting is different
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool allsameaction = true;
|
||||
|
||||
// Go for all lines
|
||||
foreach(Linedef l in lines)
|
||||
{
|
||||
// Flags
|
||||
foreach(CheckBox c in flags.Checkboxes)
|
||||
if (l.Action != fl.Action) allsameaction = false;
|
||||
|
||||
// Flags
|
||||
foreach (CheckBox c in flags.Checkboxes)
|
||||
{
|
||||
if(c.CheckState == CheckState.Indeterminate) continue; //mxd
|
||||
if(l.IsFlagSet(c.Tag.ToString()) != c.Checked)
|
||||
|
@ -335,9 +338,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//mxd
|
||||
linedefprops.Add(new LinedefProperties(l));
|
||||
}
|
||||
|
||||
// Refresh controls so that they show their image
|
||||
backhigh.Refresh();
|
||||
|
||||
if (allsameaction) flags.UpdateCheckboxes(newFlags);
|
||||
|
||||
// Refresh controls so that they show their image
|
||||
backhigh.Refresh();
|
||||
backmid.Refresh();
|
||||
backlow.Refresh();
|
||||
fronthigh.Refresh();
|
||||
|
|
|
@ -192,7 +192,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Flags
|
||||
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(ft.Type);
|
||||
IDictionary<string, string> newFlags = (ti == null || ti.Flags.Count == 0) ? General.Map.Config.ThingFlags : ti.Flags;
|
||||
flags.UpdateCheckboxes(newFlags);
|
||||
|
||||
foreach (CheckBox c in flags.Checkboxes)
|
||||
if(ft.Flags.ContainsKey(c.Tag.ToString())) c.Checked = ft.Flags[c.Tag.ToString()];
|
||||
|
@ -229,12 +228,15 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
thingprops = new List<ThingProperties>();
|
||||
bool allsametype = true;
|
||||
|
||||
// Go for all things
|
||||
foreach(Thing t in things)
|
||||
{
|
||||
//mxd. Update sector info
|
||||
t.DetermineSector();
|
||||
|
||||
if (t.Type != ft.Type) allsametype = false;
|
||||
|
||||
// Type does not match?
|
||||
ThingTypeInfo info = thingtype.GetSelectedInfo(); //mxd
|
||||
|
@ -280,7 +282,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
thingprops.Add(new ThingProperties(t));
|
||||
}
|
||||
|
||||
preventchanges = false;
|
||||
if (allsametype) flags.UpdateCheckboxes(newFlags);
|
||||
|
||||
preventchanges = false;
|
||||
|
||||
//mxd. Trigger updates manually...
|
||||
preventmapchange = true;
|
||||
|
|
Loading…
Reference in a new issue