Skip to content

Commit

Permalink
fixed #882
Browse files Browse the repository at this point in the history
  • Loading branch information
NaBian committed Jun 28, 2021
1 parent a879ebc commit 2aff85c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ public ContextMenu Menu
/// <param name="oldIndex"></param>
private void UpdateItemOffsetX(int oldIndex)
{
if (!_isDragging) return;
if (!_isDragging || CurrentIndex >= TabPanel.ItemDic.Count)
{
return;
}

var moveItem = TabPanel.ItemDic[CurrentIndex];
moveItem.CurrentIndex -= CurrentIndex - oldIndex;
var offsetX = moveItem.TargetOffsetX;
Expand Down

0 comments on commit 2aff85c

Please sign in to comment.