Fixed paste bug (B2016-005) remove paste options from tree context menus when copied step is deleted.
Made a public method to enable/disable the ribbon’s paste buttons so it can be called when a step is deleted from the tree view. (B2016-005)
This commit is contained in:
@@ -1015,10 +1015,18 @@ namespace VEPROMS
|
||||
{
|
||||
if (displayHistory.MyEditItem != null && displayHistory.MyItemInfo.MyProcedure.ItemID == args.MyItemInfo.ItemID)
|
||||
displayHistory.MyEditItem = null;
|
||||
return tc.DeleteRTBItem(args.MyItemInfo);
|
||||
//if (si == null) return false;
|
||||
//si.RemoveItem();
|
||||
//return true;
|
||||
// bug fix B2016-005 - set MyCopyStep to null. This will take the paste options off of the tree node context menus. jsj 4-19-2016
|
||||
if (args.MyItemInfo.ItemID == tc.MyCopyStep.ItemID)
|
||||
tc.MyCopyStep = null;
|
||||
bool rtval = tc.DeleteRTBItem(args.MyItemInfo);
|
||||
// Also disable the paste options on the ribbon if it is open. jsj 4-19-2016
|
||||
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyStepTabPanel != null) // MyStepTabPanel will be null if the active tab is a Word Attachment
|
||||
{
|
||||
StepPanel pnl = tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepPanel;
|
||||
if (pnl != null)
|
||||
pnl.MyStepTabPanel.MyStepTabRibbon.SetPasteButtons(false);
|
||||
}
|
||||
return rtval;
|
||||
}
|
||||
private bool tv_PasteItemInfo(object sender, vlnTreeItemInfoPasteEventArgs args)
|
||||
{
|
||||
|
Reference in New Issue
Block a user