LCL: TCustomListView: reset FCacheIndex and FCacheItems before sorting list, otherwise we'll have unexpected results. issue #22218

git-svn-id: trunk@37564 -
This commit is contained in:
zeljko 2012-06-07 11:53:27 +00:00
parent 64f7c37ce8
commit 59834c98ec

View File

@ -900,6 +900,9 @@ begin
end; end;
end; end;
Items.FCacheIndex := -1;
Items.FCacheItem := nil;
FListItems.FItems.Sort(@CompareItems); FListItems.FItems.Sort(@CompareItems);
TWSCustomListViewClass(WidgetSetClass).SetSort(Self, FSortType, TWSCustomListViewClass(WidgetSetClass).SetSort(Self, FSortType,
FSortColumn, FSortDirection); FSortColumn, FSortDirection);