Fixed null reference
Fixed null reference and logic to support Placekeeper check box
This commit is contained in:
parent
387dcd5dac
commit
1664a62e4d
@ -683,7 +683,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
SectionConfig scfg = (SectionConfig)MyActiveSection.MyConfig;
|
||||
SectionConfig scfg = (SectionConfig)ActiveSection.MyConfig;
|
||||
if (MyDocStyle.StructureStyle.Style == null || scfg == null) return false;
|
||||
bool PlacekeepOption = ((ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.AutoPlacekeeper) == E_PurchaseOptions.AutoPlacekeeper)
|
||||
&& scfg.Section_Placekeeper.Equals("Y");
|
||||
|
@ -147,7 +147,7 @@ namespace Volian.Controls.Library
|
||||
cbPageBreak.Checked = false; // will be set below if HLS & config has it on
|
||||
cbPlaceKeeper.Checked = false; // will be set below if HLS & config has this set
|
||||
cbPageBreak.Enabled = CurItemInfo.IsHigh;
|
||||
cbPlaceKeeper.Enabled = ((SectionConfig)CurItemInfo.MyActiveSection.MyConfig).Section_Placekeeper == "Y";
|
||||
cbPlaceKeeper.Enabled = ((SectionConfig)CurItemInfo.ActiveSection.MyConfig).Section_Placekeeper == "Y";
|
||||
cbCAS.Enabled = true;
|
||||
rbChgBarOff.Enabled = true;
|
||||
rbChgBarOn.Enabled = true;
|
||||
@ -180,7 +180,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (CurItemInfo.IsHigh)
|
||||
cbPageBreak.Checked = sc.Step_NewManualPagebreak;
|
||||
cbPlaceKeeper.Checked = sc.Step_Placekeeper;
|
||||
cbPlaceKeeper.Checked = sc.Step_Placekeeper.ToUpper() != "N";
|
||||
cbCAS.Checked = sc.Step_CAS;
|
||||
}
|
||||
bool _checkoffsAllowed = true;
|
||||
@ -337,7 +337,7 @@ namespace Volian.Controls.Library
|
||||
MyEditItem.SaveContents();
|
||||
StepConfig sc = CurItemInfo.MyConfig as StepConfig;
|
||||
if (sc == null) return;
|
||||
sc.Step_Placekeeper = cbPlaceKeeper.Checked;
|
||||
sc.Step_Placekeeper = (cbPlaceKeeper.Checked)?"Y":"N";
|
||||
}
|
||||
private void listBoxStepTypes_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user