B2017-222: Don’t create enhanced links for paste replaced steps
This commit is contained in:
@@ -241,7 +241,12 @@ namespace Volian.Controls.Library
|
||||
get { return _EnhAddFromItemInfo; }
|
||||
set { _EnhAddFromItemInfo = value; }
|
||||
}
|
||||
private ItemInfo _EnhCopiedItemInfo = null;
|
||||
private bool _DoingPasteReplace = false;
|
||||
public bool DoingPasteReplace
|
||||
{
|
||||
get { return _DoingPasteReplace; }
|
||||
set { _DoingPasteReplace = value; }
|
||||
}
|
||||
#endregion
|
||||
#region Constructors
|
||||
public RTBItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand)
|
||||
@@ -825,8 +830,13 @@ namespace Volian.Controls.Library
|
||||
ItemInfo.EAddpingPart addpart = ItemInfo.EAddpingPart.After;
|
||||
if (EnhAddType == EnhancedAddTypes.Before) addpart = ItemInfo.EAddpingPart.Before;
|
||||
else if (EnhAddType == EnhancedAddTypes.Child) addpart = ItemInfo.EAddpingPart.Child;
|
||||
ItemInfo newEnh = MyItemInfo.DoAddEnhancedSteps(ed.Type, ed.ItemID, addpart);
|
||||
if (newEnh != null) AddEnhancedItemToDisplayTabItem(newEnh);
|
||||
// B2017-222: if replacing, don't do the enhanced links. The past replace button isn't active for enhanced,
|
||||
// however, paste replace was accessed when creating a new HLS/Caution/Note and then replacing into it.
|
||||
if (MyItemInfo.MyContent.Text != "" && !DoingPasteReplace)
|
||||
{
|
||||
ItemInfo newEnh = MyItemInfo.DoAddEnhancedSteps(ed.Type, ed.ItemID, addpart);
|
||||
if (newEnh != null) AddEnhancedItemToDisplayTabItem(newEnh);
|
||||
}
|
||||
}
|
||||
EnhAddType = EnhancedAddTypes.No;
|
||||
}
|
||||
|
Reference in New Issue
Block a user