Fixed null reference error when inserting a figure off of a figure

This commit is contained in:
2016-06-01 14:49:59 +00:00
parent 0166b06209
commit 6ed306e8b9
3 changed files with 18 additions and 10 deletions

View File

@@ -153,7 +153,7 @@ namespace Volian.Controls.Library
if (wNew > ItemWidth)
{
ItemWidth = wNew;
ItemLocation = TableLocation(MyParentEditItem, MyStepSectionLayoutData, wNew);
ItemLocation = TableLocation(MyStepSectionLayoutData, wNew);
}
}
else
@@ -162,7 +162,7 @@ namespace Volian.Controls.Library
if (ItemWidth != newwidth)
{
ItemWidth = newwidth;
ItemLocation = TableLocation(MyParentEditItem, MyStepSectionLayoutData, newwidth);
ItemLocation = TableLocation( MyStepSectionLayoutData, newwidth);
}
}
}
@@ -452,7 +452,7 @@ namespace Volian.Controls.Library
// We had a table that was in a funky state. This allows it to appear in editor so
// that is could be deleted.
if (_MyParentEditItem == null) return;
Point newLocation = TableLocation(_MyParentEditItem, MyStepSectionLayoutData, ItemWidth);
Point newLocation = TableLocation(MyStepSectionLayoutData, ItemWidth);
if (!newLocation.Equals(ItemLocation)) ItemLocation = newLocation;
}
public override void SetToolTip(string tip)