mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-18 21:39:23 +02:00
LCL: Minor optimization for Grid column sort.
git-svn-id: trunk@30717 -
This commit is contained in:
parent
4ee7294cd2
commit
1e6d1a65e8
@ -3257,7 +3257,6 @@ begin
|
||||
with FColumns[ColOfs].Title do
|
||||
ImageIndex := FOldImageIndex;
|
||||
end;
|
||||
FSortColumn := index;
|
||||
// Show the sort glyph only if clicked column has a TGridColumn defined.
|
||||
ColOfs := index - FFixedCols;
|
||||
if (ColOfs > -1) and (ColOfs < FColumns.Count)
|
||||
@ -3265,13 +3264,14 @@ begin
|
||||
and (FDescImgInd < TitleImageList.Count) then
|
||||
with FColumns[ColOfs].Title do begin
|
||||
// Save previous ImageIndex of the clicked column.
|
||||
if (ImageIndex <> FAscImgInd) and (ImageIndex <> FDescImgInd) then
|
||||
if (index <> FSortColumn) then
|
||||
FOldImageIndex := ImageIndex;
|
||||
case FSortOrder of // Show the right sort glyph.
|
||||
soAscending: ImageIndex := FAscImgInd;
|
||||
soDescending: ImageIndex := FDescImgInd;
|
||||
end;
|
||||
end;
|
||||
FSortColumn := index;
|
||||
Sort(True, index, FFixedRows, RowCount-1);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user