ClearUndo when _IsDirty is set to False & Show Item even if parent is collapsed.

This commit is contained in:
Rich
2008-05-22 12:04:21 +00:00
parent f5aaaf2b77
commit b1b68a3091
2 changed files with 13 additions and 12 deletions

View File

@@ -231,18 +231,14 @@ namespace Volian.Controls.Library
private void ExpandAsNeeded(ItemInfo myItemInfo)
{
int id = myItemInfo.ItemID;
if (_LookupStepItems.ContainsKey(id)) // If the item is currently displayed
{
_LookupStepItems[id].AutoExpand(); // Expand it if it should expand
}
else
{
if (!_LookupStepItems.ContainsKey(id)) // If the item is not currently displayed
ExpandAsNeeded((ItemInfo)myItemInfo.ActiveParent); // Expand it's parent
if (!_LookupStepItems.ContainsKey(id)) // Expand Parent if not expanded
{
int parentId = ((ItemInfo)myItemInfo.ActiveParent).ItemID;
_LookupStepItems[parentId].AutoExpand();
}
if (_LookupStepItems.ContainsKey(id)) // Expanding Parent should have added it to _LookupStepItems
{
StepItem itm = _LookupStepItems[id];
if (itm.Visible == false)
ExpandAsNeeded((ItemInfo)myItemInfo.ActiveParent);
itm.AutoExpand(); // Expand it if it should expand
}
}
#endregion