B2020-058: Null reference on procedure properties when procedure is an enhanced procedure (part 2)

This commit is contained in:
Kathy Ruffing 2020-04-22 16:12:02 +00:00
parent 99c68d0578
commit 50c9732e9a

View File

@ -1723,7 +1723,8 @@ namespace Volian.Controls.Library
else
btnCASCreate.Enabled = (MyEditItem != null) ? (MyEditItem.MyStepPanel.ApplDisplayMode > 0) : false;
// B2016-237 added context menu item to change image size
btnCMImgSz.Enabled = MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK"));
// B2020-058 added check for null MyEditItem
btnCMImgSz.Enabled = MyEditItem!=null && MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK"));
}
// Made a public method so that it can be called when a step is deleted from the tree view.