mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add clear marked items method to IDDB
This commit is contained in:
@@ -116,6 +116,22 @@ namespace SabreTools.DatFiles
|
|||||||
return _machineIndex - 1;
|
return _machineIndex - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove all items marked for removal
|
||||||
|
/// </summary>
|
||||||
|
public void ClearMarked()
|
||||||
|
{
|
||||||
|
var itemIndices = _items.Keys;
|
||||||
|
foreach (long itemIndex in itemIndices)
|
||||||
|
{
|
||||||
|
var datItem = _items[itemIndex];
|
||||||
|
if (datItem == null || datItem.GetBoolFieldValue(DatItem.RemoveKey) != true)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
RemoveItem(itemIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get an item based on the index
|
/// Get an item based on the index
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user