B2018-076 - Adding a substep to a second figure was causing the code to crrash
This commit is contained in:
parent
7c6f304957
commit
588edabb25
@ -3645,8 +3645,12 @@ namespace Volian.Controls.Library
|
||||
ContentWidth = myParentEditItem.ContentWidth;
|
||||
if (itemInfo.IsStep && itemInfo.MyParent.IsFigure)
|
||||
{
|
||||
ContentWidth = myParentEditItem.MyParentEditItem.ContentWidth;
|
||||
Left = myParentEditItem.MyParentEditItem.Left + myParentEditItem.MyParentEditItem.TabLeft; // B2017-129 fixed null reference
|
||||
// B2018-076 _ Handle Multiple Tables or Figure where Parent is null and Previous is not null
|
||||
EditItem mypar = myParentEditItem;
|
||||
while (mypar.MyParentEditItem == null && mypar.MyPreviousEditItem != null)
|
||||
mypar = mypar.MyPreviousEditItem;
|
||||
ContentWidth = mypar.MyParentEditItem.ContentWidth;
|
||||
Left = mypar.MyParentEditItem.Left + mypar.MyParentEditItem.TabLeft; // B2017-129 fixed null reference
|
||||
}
|
||||
|
||||
if (myChildRelation == ChildRelation.None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user