B2026-042-Fix-Null-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-4 #762

Showing only changes of commit 1b1dc78548 - Show all commits
@@ -69,13 +69,16 @@ namespace Volian.Controls.Library
{
MyItemInfo = _MyDisplayTabItem.MyItemInfo;
}
if (MyItemInfo.IsRNOPart == true)
if (MyItemInfo != null)
{
btnApplicabilitychg.Enabled = false;
}
else
{
btnApplicabilitychg.Enabled = true;
if (MyItemInfo.IsRNOPart == true) // Check if step is an RNO disable "Set All To Level" button.
{
btnApplicabilitychg.Enabled = false;
}
else
{
btnApplicabilitychg.Enabled = true;
}
}
}
}
@@ -402,13 +405,16 @@ namespace Volian.Controls.Library
if (_MyItemInfo != null)
{
if (this.Visible == false) return;
if (_MyItemInfo.IsRNOPart == true) // Check if step is an RNO disable "Set All To Level" button.
if (MyItemInfo != null)
Outdated
Review

Also, I am not sure how this would ever get hit as isn't this basically the same check as line 405?

Also, I am not sure how this would ever get hit as isn't this basically the same check as line 405?
Outdated
Review

in addition to Matt's comment, the MyItemInfo references should be "_MyItemInfo" as we are in the Set portion of "MyItemInfo". All of the other references in this Set code use "_MyItemInfo".

in addition to Matt's comment, the MyItemInfo references should be "_MyItemInfo" as we are in the Set portion of "MyItemInfo". All of the other references in this Set code use "_MyItemInfo".
Outdated
Review

The default is enabled. If there _MyItemInfo is null, then the users have not entered a step yet.

The default is enabled. If there _MyItemInfo is null, then the users have not entered a step yet.
Outdated
Review

As mentioned above this 2nd if statement that you added is unnecessary - I took a screenshot and attached here to re-illustrate. The part with a purple square is unnecessary because that is already done by the part in the red square.

As mentioned above this 2nd if statement that you added is unnecessary - I took a screenshot and attached here to re-illustrate. The part with a purple square is unnecessary because that is already done by the part in the red square.
{
btnApplicabilitychg.Enabled = false;
}
else
{
btnApplicabilitychg.Enabled = true;
if (MyItemInfo.IsRNOPart == true) // Check if step is an RNO disable "Set All To Level" button.
{
btnApplicabilitychg.Enabled = false;
}
else
{
btnApplicabilitychg.Enabled = true;
}
}
IItemConfig cfg = _MyItemInfo.MyConfig as IItemConfig;
List<int> apples = cfg.MasterSlave_Applicability.GetFlags();