B2016-023: For enhanced, display pasted steps in edit window if editor is open

B2016-025: Ribbon button enabling for enhanced support
This commit is contained in:
2016-01-29 15:03:43 +00:00
parent b087ce9996
commit 948fe7f1de
3 changed files with 50 additions and 23 deletions

View File

@@ -796,22 +796,7 @@ namespace Volian.Controls.Library
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)
{
// if tabcontrol was open for enhanced, display the steps:
ItemInfo proc = newEnh.MyProcedure; // Find procedure Item
string key = "Item - " + proc.ItemID.ToString();
if (MyStepPanel.MyStepTabPanel.MyDisplayTabControl._MyDisplayTabItems.ContainsKey(key))
{
DisplayTabItem pg = MyStepPanel.MyStepTabPanel.MyDisplayTabControl._MyDisplayTabItems[key];
// _MyDisplayTabItems (in line above) had tabs that were closed, so use the next line
// to validate that the tab is still open.
foreach (DisplayTabItem ti in MyStepPanel.MyStepTabPanel.MyDisplayTabControl.MyBar.Items)
{
if (ti == pg) pg.MyStepTabPanel.MyStepPanel.GetEditItem(newEnh);
}
}
}
if (newEnh != null) AddEnhancedItemToDisplayTabItem(newEnh);
}
EnhAddType = EnhancedAddTypes.No;
}