Use config data to determine whether a step is enhanced rather than format flag EnhancedLinkedStep
Remove EnhancedLinkedStep format flag Remove unnecessary comments
This commit is contained in:
parent
8a43e3d5dc
commit
7f38f14657
@ -1960,11 +1960,9 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
if (FormatStepData != null)
|
||||
{
|
||||
E_AccStep? actable = FormatStepData.StepEditData.AcTable;
|
||||
return (actable != null && MyActiveSection != null && MyActiveSection.IsEnhancedSection && ((actable & E_AccStep.EnhancedLinkedStep) != 0));
|
||||
}
|
||||
if (!IsStep) return false;
|
||||
StepConfig sc = MyConfig as StepConfig;
|
||||
if (sc.MyEnhancedDocuments != null && sc.MyEnhancedDocuments.Count == 1 && sc.MyEnhancedDocuments[0].Type == 0) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,6 @@ namespace VEPROMS.CSLA.Library
|
||||
AddingTable = 16,
|
||||
AddingNext = 32,
|
||||
AddingPrev = 64,
|
||||
EnhancedLinkedStep = 128 // this will flag that this is a linked step & should not allow inserts/deletes
|
||||
}
|
||||
[Flags]
|
||||
public enum E_ReplaceFlags : uint
|
||||
|
@ -1508,10 +1508,9 @@ namespace Volian.Controls.Library
|
||||
StepData sd = MyItemInfo.FormatStepData;
|
||||
actable = sd.StepEditData.AcTable;
|
||||
if (actable == null) actable = 0;
|
||||
//btnInsHLS.Enabled = !MyItemInfo.IsEnhancedStep && MyItemInfo.MyHLS != null && !MyItemInfo.MyHLS.IsEnhancedStep; // (actable & E_AccStep.EnhancedLinkedStep) == 0;
|
||||
btnInsHLS.Enabled = MyItemInfo.MyHLS != null; // (actable & E_AccStep.EnhancedLinkedStep) == 0;
|
||||
btnInsHLS.Enabled = MyItemInfo.MyHLS != null;
|
||||
|
||||
btnInsCaut.Enabled = ((actable & E_AccStep.AddingCaution) > 0) && !MyItemInfo.IsEnhancedStep; // ((actable & E_AccStep.AddingCaution) > 0) && ((actable & E_AccStep.EnhancedLinkedStep) == 0);
|
||||
btnInsCaut.Enabled = ((actable & E_AccStep.AddingCaution) > 0) && !MyItemInfo.IsEnhancedStep;
|
||||
btnInsNote.Enabled = ((actable & E_AccStep.AddingNote) > 0) && !MyItemInfo.IsEnhancedStep;
|
||||
btnInsRNO.Enabled = (actable & E_AccStep.AddingRNO) > 0;
|
||||
btnInsFig.Enabled = (actable & E_AccStep.AddingTable) > 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user