diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index 1f305220a3..06d90d2bce 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -1653,7 +1653,7 @@ BPoseView::AddPosesThreadValid(const entry_ref *ref) const void BPoseView::AddPoseToList(PoseList *list, bool visibleList, bool insertionSort, - BPose *pose, BRect &viewBounds, float &listViewScrollBy, bool forceDraw) + BPose *pose, BRect &viewBounds, float &listViewScrollBy, bool forceDraw, int32 *indexPtr) { int32 poseIndex = list->CountItems(); @@ -1732,6 +1732,9 @@ BPoseView::AddPoseToList(PoseList *list, bool visibleList, bool insertionSort, if (viewBounds.Intersects(poseBounds)) SynchronousUpdate(poseBounds); } + + if (indexPtr) + *indexPtr = poseIndex; } @@ -1793,11 +1796,11 @@ BPoseView::CreatePoses(Model **models, PoseInfo *poseInfoArray, int32 count, case kListMode: { AddPoseToList(fPoseList, !fFiltering, insertionSort, pose, - viewBounds, listViewScrollBy, forceDraw); + viewBounds, listViewScrollBy, forceDraw, &poseIndex); if (fFiltering && FilterPose(pose)) { AddPoseToList(fFilteredPoseList, true, insertionSort, pose, - viewBounds, listViewScrollBy, forceDraw); + viewBounds, listViewScrollBy, forceDraw, &poseIndex); } break; diff --git a/src/kits/tracker/PoseView.h b/src/kits/tracker/PoseView.h index 78747a84fc..36e2c1ce2b 100644 --- a/src/kits/tracker/PoseView.h +++ b/src/kits/tracker/PoseView.h @@ -446,7 +446,7 @@ class BPoseView : public BView { void AddPoseToList(PoseList *list, bool visibleList, bool insertionSort, BPose *pose, BRect &viewBounds, float &listViewScrollBy, - bool forceDraw); + bool forceDraw, int32 *indexPtr = NULL); BPose *CreatePose(Model *, PoseInfo *, bool insertionSort = true, int32 *index = 0, BRect *boundsPtr = 0, bool forceDraw = true); virtual void CreatePoses(Model **models, PoseInfo *poseInfoArray, int32 count,