Check for a null when getting checkoff information
Added logic to use the DropCheckoff flag which tell the code that the checkoff goes on last row of the text. (default should be first row of text)
This commit is contained in:
parent
904947bb08
commit
870aa7736e
@ -204,7 +204,7 @@ namespace Volian.Controls.Library
|
|||||||
MyItemInfo.RefreshItemAnnotations();
|
MyItemInfo.RefreshItemAnnotations();
|
||||||
ChangeBar = MyItemInfo.HasChangeBar;
|
ChangeBar = MyItemInfo.HasChangeBar;
|
||||||
CheckOff co = _MyItemInfo.GetCheckOffStep();
|
CheckOff co = _MyItemInfo.GetCheckOffStep();
|
||||||
if (co != null)
|
if (co != null && co.UIMark != null)
|
||||||
{
|
{
|
||||||
UserCheckOff = true;
|
UserCheckOff = true;
|
||||||
UserCheckOffChar = (char)co.UIMark;
|
UserCheckOffChar = (char)co.UIMark;
|
||||||
|
@ -937,7 +937,9 @@ namespace Volian.Print.Library
|
|||||||
mytab.YOffset = yoff;
|
mytab.YOffset = yoff;
|
||||||
if (mytab.MyMacro != null) mytab.MyMacro.YOffset = yoff;
|
if (mytab.MyMacro != null) mytab.MyMacro.YOffset = yoff;
|
||||||
}
|
}
|
||||||
float yForCheckoff = 0;
|
float yForCheckoff = yoff; //0; - default checkoff row is same as FIRST line of text
|
||||||
|
// if dropCheckoff is true, then the checkoff is place on the same of row as the LAST line of text
|
||||||
|
bool dropCheckoff = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.DropCheckOff;
|
||||||
if (itemInfo.MyContent.MyGrid != null)
|
if (itemInfo.MyContent.MyGrid != null)
|
||||||
{
|
{
|
||||||
VlnFlexGrid myFlexGrid = new VlnFlexGrid(1,1);
|
VlnFlexGrid myFlexGrid = new VlnFlexGrid(1,1);
|
||||||
@ -945,7 +947,9 @@ namespace Volian.Print.Library
|
|||||||
MyGrid = new vlnTable(myFlexGrid, cb);
|
MyGrid = new vlnTable(myFlexGrid, cb);
|
||||||
Height = MyGrid.Height;
|
Height = MyGrid.Height;
|
||||||
Width = MyGrid.Width;
|
Width = MyGrid.Width;
|
||||||
yForCheckoff = yoff + Height - SixLinesPerInch;
|
//yForCheckoff = yoff + Height - SixLinesPerInch;
|
||||||
|
if (dropCheckoff)
|
||||||
|
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
||||||
yoff += (Height + (2 * SixLinesPerInch));
|
yoff += (Height + (2 * SixLinesPerInch));
|
||||||
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
||||||
}
|
}
|
||||||
@ -969,7 +973,9 @@ namespace Volian.Print.Library
|
|||||||
Width = Int32.Parse(vals[3], System.Globalization.NumberStyles.AllowHexSpecifier) * MyItemInfo.FormatStepData.Font.CharsToTwips;
|
Width = Int32.Parse(vals[3], System.Globalization.NumberStyles.AllowHexSpecifier) * MyItemInfo.FormatStepData.Font.CharsToTwips;
|
||||||
int lines = Int32.Parse(vals[2], System.Globalization.NumberStyles.AllowHexSpecifier);
|
int lines = Int32.Parse(vals[2], System.Globalization.NumberStyles.AllowHexSpecifier);
|
||||||
Height = lines * SixLinesPerInch;
|
Height = lines * SixLinesPerInch;
|
||||||
yForCheckoff = yoff + Height - SixLinesPerInch;
|
//yForCheckoff = yoff + Height - SixLinesPerInch;
|
||||||
|
if (dropCheckoff)
|
||||||
|
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
||||||
yoff += (Height + (2 * SixLinesPerInch));
|
yoff += (Height + (2 * SixLinesPerInch));
|
||||||
string erMsg = null;
|
string erMsg = null;
|
||||||
try
|
try
|
||||||
@ -1005,8 +1011,10 @@ namespace Volian.Print.Library
|
|||||||
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout))
|
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout))
|
||||||
{
|
{
|
||||||
yoff += Height;
|
yoff += Height;
|
||||||
yForCheckoff = yoff - SixLinesPerInch;
|
//yForCheckoff = yoff - SixLinesPerInch;
|
||||||
yoff += AdjustForBlankLines();
|
yoff += AdjustForBlankLines();
|
||||||
|
if (dropCheckoff)
|
||||||
|
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CheckOff co = itemInfo.GetCheckOffStep();
|
CheckOff co = itemInfo.GetCheckOffStep();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user