B2017-180: don’t allow paste replace on source/enhanced steps.
B2017-181: fix crash when select/deselect procedure sets in search panel
This commit is contained in:
@@ -1587,7 +1587,8 @@ namespace Volian.Controls.Library
|
||||
StepTabPanel tmp = Parent as StepTabPanel;
|
||||
if (tmp.MyDisplayTabControl.MyCopyStep != null)
|
||||
{
|
||||
if (!tmp.MyDisplayTabControl.MyCopyStep.IsEnhancedStep)
|
||||
//B2017-180: The fix for B2017-158 also needed the 'HasEnhancedLinkedStep' to check if the copied step is a source step
|
||||
if (!tmp.MyDisplayTabControl.MyCopyStep.IsEnhancedStep && !tmp.MyDisplayTabControl.MyCopyStep.HasEnhancedLinkedStep)
|
||||
{
|
||||
if (MyItemInfo.IsEnhancedStep) btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = false;
|
||||
}
|
||||
@@ -1623,7 +1624,8 @@ namespace Volian.Controls.Library
|
||||
btnPasteBefore.Enabled = btnCMPasteBefore.Enabled = enable;
|
||||
btnPasteAfter.Enabled = btnCMPasteAfter.Enabled = enable;
|
||||
//B20170-158 Don't allow a step to replace a linked step
|
||||
btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = enable && !MyItemInfo.IsEnhancedStep;
|
||||
//B2017-180: The fix for B2017-158 also needed the 'HasEnhancedLinkedStep' to check if the copied step is a source step
|
||||
btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = enable && !MyItemInfo.IsEnhancedStep && !MyItemInfo.HasEnhancedLinkedStep;
|
||||
}
|
||||
private void SetPasteButtonEnabled()
|
||||
{
|
||||
|
Reference in New Issue
Block a user