Skip to content

Commit

Permalink
HotFix on issue to void crash caused by threading issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Nov 20, 2019
1 parent a5bcec8 commit c15aa6e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ protected override void OnMouseEnter( MouseEventArgs e )
return;

var childrenList = container.Children.ToList();
containerPane.MoveChild( childrenList.IndexOf( _draggingItem.Model ), childrenList.IndexOf( model ) );

// Hotfix to avoid crash caused by a likely threading issue Back in the containerPane.
var oldIndex = childrenList.IndexOf( _draggingItem.Model );
var newIndex = childrenList.IndexOf( model );

if (newIndex < containerPane.ChildrenCount && oldIndex > -1)
containerPane.MoveChild( oldIndex, newIndex );
}
}

Expand Down

0 comments on commit c15aa6e

Please sign in to comment.