B2019-009 Enable the Copy Step button when on a RNO step type

B2019-010 Don’t allow a CopyStep Paste Before or After when on a RNO step type
This commit is contained in:
John Jenko 2019-01-29 20:40:28 +00:00
parent 90d3e98966
commit d144f8653d
2 changed files with 3 additions and 1 deletions

View File

@ -64,6 +64,7 @@ namespace Volian.Controls.Library
// do special case for cpystep button: cannot copy an enhanced step and can copy a supinfo // do special case for cpystep button: cannot copy an enhanced step and can copy a supinfo
if (MyItemInfo.IsEnhancedStep) str.SetCopyStepButton(false); if (MyItemInfo.IsEnhancedStep) str.SetCopyStepButton(false);
if (MyItemInfo.IsSupInfoPart) str.SetCopyStepButton(allow); if (MyItemInfo.IsSupInfoPart) str.SetCopyStepButton(allow);
if (MyItemInfo.IsRNOPart) str.SetCopyStepButton(allow); //B2019-009 allow the selection of an RNO step type for CopyStep
} }
public EditItem(IContainer container) public EditItem(IContainer container)

View File

@ -1718,7 +1718,8 @@ namespace Volian.Controls.Library
btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = false; // don't replace itself btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = false; // don't replace itself
return; return;
} }
if (MyItemInfo.IsSupInfoPart) // before and after are always false: // B2019-010 also don't allow paste step before/after if on an RNO step type (20040)
if (MyItemInfo.IsSupInfoPart || ((int)MyItemInfo.MyContent.Type) == 20040) // before and after are always false:
{ {
btnPasteAfter.Enabled = btnCMPasteAfter.Enabled = false; btnPasteAfter.Enabled = btnCMPasteAfter.Enabled = false;
btnPasteBefore.Enabled = btnCMPasteBefore.Enabled = false; btnPasteBefore.Enabled = btnCMPasteBefore.Enabled = false;