Removed Debug Print

Moved code to add sections to Procedure parts
Moved code to add steps to Section parts
Moved code to add steps to Step parts
Changed Debug Print
Fixed a Format Flag conversion DontBreakOptEquipmentList
Changed GetItemFont so that parent items would not be left in the cache
Changed AddIncludedStepNumber to allow for ranges to sub levels.
Added a array reference to StepDataList by index.
This commit is contained in:
Rich
2010-06-17 18:42:06 +00:00
parent 332e35c484
commit 5af2c31559
9 changed files with 108 additions and 44 deletions

View File

@@ -1099,7 +1099,7 @@ namespace VEPROMS.CSLA.Library
case 2: // step types
int typindx = type - 20000; // what to do for other types rather than steps
font = format.PlantFormat.FormatData.StepDataList[typindx].Font;
if (IsParagraph) font = AdjustForTextSubFollowsTextStyle(font);
if (typindx == _ParagraphType) font = AdjustForTextSubFollowsTextStyle(format,typindx,font);
break;
}
}
@@ -1109,14 +1109,20 @@ namespace VEPROMS.CSLA.Library
}
return font;
}
private const int _ParagraphType=24;
protected VE_Font AdjustForTextSubFollowsTextStyle(VE_Font font)
{
if (FormatStepData.TextSubFollowsTextStyle && ParentNoteOrCaution != null)
return AdjustForTextSubFollowsTextStyle(ActiveFormat, this.FormatStepType, font);
}
private VE_Font AdjustForTextSubFollowsTextStyle(FormatInfo format, int typindx, VE_Font font)
{
StepData myFormatStepData = format.PlantFormat.FormatData.StepDataList[typindx];
if (myFormatStepData.TextSubFollowsTextStyle && ParentNoteOrCaution != null)
{
bool isBold = (FormatStepData.Font.Style & E_Style.Bold) > 0;
bool isMmBold = (FormatStepData.Font.Style & E_Style.MmBold) > 0;
font = ParentNoteOrCaution.FormatStepData.Font;
bool isBold = (myFormatStepData.Font.Style & E_Style.Bold) > 0;
bool isMmBold = (myFormatStepData.Font.Style & E_Style.MmBold) > 0;
myFormatStepData = format.PlantFormat.FormatData.StepDataList[ParentNoteOrCaution.FormatStepType];
font = myFormatStepData.Font;
E_Style myStyle = (E_Style) font.Style;
myStyle ^= (myStyle & E_Style.Bold);
myStyle ^= (myStyle & E_Style.MmBold);
@@ -1947,7 +1953,7 @@ namespace VEPROMS.CSLA.Library
{
if (parent.IsCautionPart || parent.IsNotePart)
_ParentNoteOrCaution = parent;
else
else if(!parent.IsHigh)
{
_ParentNoteOrCaution = parent.ParentNoteOrCaution;
}