File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -721,7 +721,7 @@ function TStoryItem.GetPreviousSiblingStoryPoint: IStoryItem;
721
721
var parentItem := ParentStoryItem;
722
722
if not Assigned(parentItem) then exit(nil );
723
723
724
- var storyItemIndex := parentItem.StoryItems.IndexOf(Self);
724
+ var storyItemIndex := parentItem.StoryItems.IndexOf(Self as IStoryItem); // must use "as" here, else it won't always find it
725
725
var siblings := parentItem.StoryItems;
726
726
727
727
for var i := (storyItemIndex - 1 ) downto 0 do // 0-based array index
@@ -739,7 +739,7 @@ function TStoryItem.GetNextSiblingStoryPoint: IStoryItem;
739
739
var parentItem := ParentStoryItem;
740
740
if not Assigned(parentItem) then exit(nil );
741
741
742
- var storyItemIndex := parentItem.StoryItems.IndexOf(Self as IStoryItem);
742
+ var storyItemIndex := parentItem.StoryItems.IndexOf(Self as IStoryItem); // must use "as" here, else it won't always find it
743
743
var siblings := parentItem.StoryItems;
744
744
745
745
for var i := (storyItemIndex + 1 ) to (siblings.Count - 1 ) do // 0-based array index
You can’t perform that action at this time.
0 commit comments