fix, todolist, sorting colums broken when not the first

This commit is contained in:
Basile Burg 2015-11-02 05:04:05 +01:00
parent 20cfc043eb
commit 2c2fd1347c
1 changed files with 3 additions and 1 deletions

View File

@ -551,6 +551,7 @@ var
begin
if lstItems.Selected = nil then
exit;
lstItems.BeginUpdate;
curr := lstItems.Selected;
//
if lstItems.SortDirection = sdAscending then
@ -560,7 +561,7 @@ begin
lstItems.SortColumn := Column.Index;
lstItems.Selected := nil;
lstItems.Selected := curr;
lstItems.Update;
lstItems.EndUpdate;
end;
procedure TCETodoListWidget.lstItemsCompare(Sender: TObject; item1, item2: TListItem; Data: Integer; var Compare: Integer);
@ -577,6 +578,7 @@ begin
end
else
begin
col -= 1;
if col < item1.SubItems.Count then
txt1 := item1.SubItems.Strings[col];
if col < item2.SubItems.Count then