Skip to content

Commit

Permalink
Merge pull request #264 from redbluegames/staging
Browse files Browse the repository at this point in the history
Merge Staging
  • Loading branch information
edwardrowe authored Sep 15, 2020
2 parents 39336db + 2846f8e commit e68c191
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,8 @@ private void DrawPreviewRows(
case PreviewRowResult.Delete:
if (this.ObjectRemovedAtIndex != null)
{
this.ObjectRemovedAtIndex.Invoke(i);
var absoluteIndex = previewContents.FirstVisibleItemIndex + i;
this.ObjectRemovedAtIndex.Invoke(absoluteIndex);
}
break;
default:
Expand Down Expand Up @@ -1109,6 +1110,8 @@ private class PreviewPanelContents

public int TotalNumRows { get; set; }

public int FirstVisibleItemIndex {get; set;}

public int NumVisibleRows
{
get
Expand Down Expand Up @@ -1144,6 +1147,7 @@ public static PreviewPanelContents CreatePreviewContentsForObjects(
int stepIndex)
{
var previewPanelContents = new PreviewPanelContents();
previewPanelContents.FirstVisibleItemIndex = firstPreviewIndex;
previewPanelContents.RenameStepIndex = stepIndex;

var numVisibleObjects = Mathf.Min(numObjectsToShow, preview.NumObjects);
Expand Down Expand Up @@ -1179,8 +1183,6 @@ public static PreviewPanelContents CreatePreviewContentsForObjects(
}

info.IndexInPreview = indexOfVisibleObject;
info.FirstElement = j == 0;
info.LastElement = j == (numVisibleObjects - 1);
previewPanelContents.PreviewRowInfos[j] = info;
}

Expand Down Expand Up @@ -1262,10 +1264,6 @@ public string FinalName

public int IndexInPreview { get; set; }

public bool LastElement { get; set; }

public bool FirstElement { get; set; }

public RenameResultSequence RenameResultSequence { get; set; }
public int RenameStepIndex { get; set; }

Expand Down

0 comments on commit e68c191

Please sign in to comment.