diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index d71dccd2..e838dc3a 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -270,7 +270,7 @@ namespace VEPROMS // set the section level configs: ppCbEditableData.Checked = (_SectionConfig.SubSection_Edit == "Y"); - ppCbAutoIndent.Checked = (_SectionConfig.SubSection_AutoIndent == "Y"); + ppCbAutoIndent.Checked = (pf.FormatData.SectData.UseMetaSections && _SectionConfig.SubSection_AutoIndent == "Y"); // if this section has subsections: // show the editable data check box. If showing 'editable data', the procedures steps are @@ -278,7 +278,8 @@ namespace VEPROMS // 'editable data', the steps are not shown in editor or print. // show the automatic indent checkbox. ppCbEditableData.Enabled = _SectionConfig.MySection.MySectionInfo.Sections != null && _SectionConfig.MySection.MySectionInfo.Sections.Count > 0; - ppCbAutoIndent.Enabled = _SectionConfig.MySection.MySectionInfo.Sections != null && _SectionConfig.MySection.MySectionInfo.Sections.Count > 0; + //ppCbAutoIndent.Enabled = _SectionConfig.MySection.MySectionInfo.Sections != null && _SectionConfig.MySection.MySectionInfo.Sections.Count > 0; + ppCbAutoIndent.Enabled = pf.FormatData.SectData.UseMetaSections; // Check for the print section num/title config item to determine whether that checkbox should // be checked. diff --git a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs index 65ace7ac..638029e7 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs @@ -740,7 +740,7 @@ namespace VEPROMS.CSLA.Library { // if null - return a "Y" string tmp = _Xp["SubSection", "AutoIndent"]; - return tmp==null||tmp==""?"Y":tmp; + return tmp==null||tmp==""?"N":tmp; } set { diff --git a/PROMS/Volian.Controls.Library/StepPanel.cs b/PROMS/Volian.Controls.Library/StepPanel.cs index 901a7af7..d24e54dd 100644 --- a/PROMS/Volian.Controls.Library/StepPanel.cs +++ b/PROMS/Volian.Controls.Library/StepPanel.cs @@ -364,6 +364,16 @@ namespace Volian.Controls.Library // The following line expands the items needed to display SelectedItemInfo ExpandAsNeeded(SelectedItemInfo); } + public void Reset(ItemInfo myItemInfo) + { + ItemInfo parent = myItemInfo.ActiveParent as ItemInfo; + if (parent != null) ItemInfo.ResetParts(parent.ItemID); // Force data to reload + else ItemInfo.ResetParts(myItemInfo.ItemID); + // The following line actually reloads the procedure item + MyProcedureItemInfo = MyProcedureItemInfo; // see get/set above. - Load Procedure and Sections + // The following line expands the items needed to display SelectedItemInfo + ExpandAsNeeded(myItemInfo); + } /// /// Currently selected StepRTB /// @@ -392,7 +402,8 @@ namespace Volian.Controls.Library { ExpandAsNeeded(itemInfo); if (_SelectedItemInfo == null) _SelectedItemInfo = itemInfo; - if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset(); + //if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset(); + if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset(itemInfo); if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) return null; return _LookupEditItems[itemInfo.ItemID]; }