ClearUndo when _IsDirty is set to False & Show Item even if parent is collapsed.
This commit is contained in:
parent
f5aaaf2b77
commit
b1b68a3091
@ -231,18 +231,14 @@ namespace Volian.Controls.Library
|
|||||||
private void ExpandAsNeeded(ItemInfo myItemInfo)
|
private void ExpandAsNeeded(ItemInfo myItemInfo)
|
||||||
{
|
{
|
||||||
int id = myItemInfo.ItemID;
|
int id = myItemInfo.ItemID;
|
||||||
if (_LookupStepItems.ContainsKey(id)) // If the item is currently displayed
|
if (!_LookupStepItems.ContainsKey(id)) // If the item is not currently displayed
|
||||||
{
|
|
||||||
_LookupStepItems[id].AutoExpand(); // Expand it if it should expand
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ExpandAsNeeded((ItemInfo)myItemInfo.ActiveParent); // Expand it's parent
|
ExpandAsNeeded((ItemInfo)myItemInfo.ActiveParent); // Expand it's parent
|
||||||
if (!_LookupStepItems.ContainsKey(id)) // Expand Parent if not expanded
|
if (_LookupStepItems.ContainsKey(id)) // Expanding Parent should have added it to _LookupStepItems
|
||||||
{
|
{
|
||||||
int parentId = ((ItemInfo)myItemInfo.ActiveParent).ItemID;
|
StepItem itm = _LookupStepItems[id];
|
||||||
_LookupStepItems[parentId].AutoExpand();
|
if (itm.Visible == false)
|
||||||
}
|
ExpandAsNeeded((ItemInfo)myItemInfo.ActiveParent);
|
||||||
|
itm.AutoExpand(); // Expand it if it should expand
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -79,6 +79,7 @@ namespace Volian.Controls.Library
|
|||||||
RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT);
|
RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT);
|
||||||
//_InitializingRTB = false;
|
//_InitializingRTB = false;
|
||||||
_IsDirty = false;
|
_IsDirty = false;
|
||||||
|
ClearUndo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -252,7 +253,11 @@ namespace Volian.Controls.Library
|
|||||||
if (ReadOnly) return;
|
if (ReadOnly) return;
|
||||||
if (!_IsDirty) return;
|
if (!_IsDirty) return;
|
||||||
bool success = _origDisplayText.Save((RichTextBox)this);
|
bool success = _origDisplayText.Save((RichTextBox)this);
|
||||||
if (success) _IsDirty = false;
|
if (success)
|
||||||
|
{
|
||||||
|
_IsDirty = false;
|
||||||
|
ClearUndo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region AddRtfTextAndStyles
|
#region AddRtfTextAndStyles
|
||||||
|
Loading…
x
Reference in New Issue
Block a user