Check for index in range before selecting range in DataGridView.
Replace {sp} with space when svgText elements are deserialized. Added error handling for missing genmac macros. Changed lookup to internal to check for missing genmac macros.
This commit is contained in:
parent
5a7af006a8
commit
595db08cc7
@ -398,7 +398,6 @@ namespace Sync
|
||||
if (fc.ReadOnly) fc.MoveToDevelopment();
|
||||
}
|
||||
}
|
||||
|
||||
private void listToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
dgv.EndEdit();
|
||||
@ -428,6 +427,7 @@ namespace Sync
|
||||
{
|
||||
dgv.ClearSelection();
|
||||
DataGridView.HitTestInfo info = dgv.HitTest(e.X, e.Y);
|
||||
if (info.RowIndex < 0) return;
|
||||
dgv.CurrentCell = dgv[0, info.RowIndex];
|
||||
dgv.Rows[info.RowIndex].Selected = true;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ namespace Volian.Svg.Library
|
||||
#region Part Lookup
|
||||
private Dictionary<string, SvgPart> _LookUp;
|
||||
[XmlIgnore]
|
||||
private Dictionary<string, SvgPart> LookUp
|
||||
internal Dictionary<string, SvgPart> LookUp
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ namespace Volian.Svg.Library
|
||||
public string Text
|
||||
{
|
||||
get { return _Text; }
|
||||
set { _Text = value; }
|
||||
set { _Text = value.Replace("{sp}"," "); }
|
||||
}
|
||||
#endregion
|
||||
#region Font Settings
|
||||
|
@ -346,11 +346,17 @@ namespace Volian.Svg.Library
|
||||
}
|
||||
public partial class SvgUse : SvgPartInheritance
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public override void Draw(PdfContentByte cb, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||
{
|
||||
// TODO: Could I use the template
|
||||
SetupInheritance(myParent.MyInheritedSettings);
|
||||
mySvg[_UseID].Draw(cb, scale.AdjustOrigin(X, Y), mySvg, this);
|
||||
if (mySvg.LookUp.ContainsKey(_UseID))
|
||||
mySvg[_UseID].Draw(cb, scale.AdjustOrigin(X, Y), mySvg, this);
|
||||
else
|
||||
{
|
||||
_MyLog.WarnFormat("Missing Macro '{0}'", _UseID);
|
||||
}
|
||||
//cb.AddTemplate(mySvg.GetTemplate(_UseID.Substring(1),cb), scale.X(X), scale.Y(cb, Y));
|
||||
}
|
||||
public override void Draw(PdfTemplate tmp, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user