Calvert: copied steps/sections have change ids
This commit is contained in:
@@ -1178,8 +1178,10 @@ namespace Volian.Controls.Library
|
||||
#region CopyPaste
|
||||
public void PasteSiblingBefore(int copyStartID)
|
||||
{
|
||||
ItemInfo newItemInfo = MyItemInfo.PasteSiblingBefore(copyStartID);
|
||||
ItemInfo newItemInfo = MyItemInfo.PasteSiblingBefore(copyStartID, GetChangeId(MyItemInfo));
|
||||
|
||||
if (newItemInfo.ItemID == MyItemInfo.ItemID) return;
|
||||
|
||||
EditItem newEditItem = null;
|
||||
switch (_MyChildRelation)
|
||||
{
|
||||
@@ -1199,9 +1201,18 @@ namespace Volian.Controls.Library
|
||||
MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OnItemPaste(this, new vlnTreeItemInfoPasteEventArgs(newItemInfo, copyStartID, ItemInfo.EAddpingPart.Before, newItemInfo.MyContent.Type));
|
||||
|
||||
}
|
||||
|
||||
private string GetChangeId(ItemInfo iiDest)
|
||||
{
|
||||
// get the change id for the destination's procedure's change id.
|
||||
string chgid = null;
|
||||
if (iiDest.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds)
|
||||
chgid = MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ItemsChangeIds[iiDest.MyProcedure.ItemID];
|
||||
return chgid;
|
||||
}
|
||||
public void PasteSiblingAfter(int copyStartID)
|
||||
{
|
||||
ItemInfo newItemInfo = MyItemInfo.PasteSiblingAfter(copyStartID);
|
||||
ItemInfo newItemInfo = MyItemInfo.PasteSiblingAfter(copyStartID, GetChangeId(MyItemInfo));
|
||||
if (newItemInfo.ItemID == MyItemInfo.ItemID) return;
|
||||
EditItem newEditItem = null;
|
||||
switch (_MyChildRelation)
|
||||
@@ -1241,7 +1252,7 @@ namespace Volian.Controls.Library
|
||||
ItemInfo newItemInfo = null;
|
||||
try
|
||||
{
|
||||
newItemInfo = Item.PasteReplace(MyItemInfo, copyStartID);
|
||||
newItemInfo = Item.PasteReplace(MyItemInfo, copyStartID, GetChangeId(MyItemInfo));
|
||||
}
|
||||
//catch (System.Data.SqlClient.SqlException ex)
|
||||
catch (Exception ex)
|
||||
|
Reference in New Issue
Block a user