mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
fixed contents of UDMF fields editor when used with multiple selected items (sometimes they looked hard defined when not defined on all selected items)
This commit is contained in:
parent
9854653465
commit
d3764c6b93
1 changed files with 23 additions and 13 deletions
|
@ -104,7 +104,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// Update new row
|
||||
SetupNewRowStyle();
|
||||
}
|
||||
|
||||
|
||||
// This sets up the fields and values from a UniFields object
|
||||
// When first is true, the values are applied unconditionally
|
||||
// When first is false, the values in the grid are erased when
|
||||
|
@ -149,20 +149,9 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
foundrow = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// Is this row defined previously?
|
||||
if(frow.IsDefined)
|
||||
{
|
||||
// Check if this row can not be found in the fields at all
|
||||
if(!fromfields.ContainsKey(frow.Name))
|
||||
{
|
||||
// It is not defined in these fields, clear the value
|
||||
frow.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Row not found?
|
||||
if(!foundrow)
|
||||
{
|
||||
|
@ -175,7 +164,28 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
if(!first) frow.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Now check for rows that the givens fields do NOT have
|
||||
foreach(DataGridViewRow row in fieldslist.Rows)
|
||||
{
|
||||
// Row is a field?
|
||||
if(row is FieldsEditorRow)
|
||||
{
|
||||
FieldsEditorRow frow = row as FieldsEditorRow;
|
||||
|
||||
// Is this row defined previously?
|
||||
if(frow.IsDefined)
|
||||
{
|
||||
// Check if this row can not be found in the fields at all
|
||||
if(!fromfields.ContainsKey(frow.Name))
|
||||
{
|
||||
// It is not defined in these fields, clear the value
|
||||
frow.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort fields
|
||||
Sort();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue