mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Find a better alternative to d262a6acc920083e0728c324a968f83f11f263b7 : set descending column order on first header click when shift key is pressed . See https://www.heidisql.com/forum.php?t=40243
This commit is contained in:
@ -10292,6 +10292,7 @@ var
|
||||
frm: TForm;
|
||||
ColName: String;
|
||||
SortItem: TSortItem;
|
||||
SortOrder: TSortItemOrder;
|
||||
begin
|
||||
if HitInfo.Column = NoColumn then
|
||||
Exit;
|
||||
@ -10312,7 +10313,11 @@ begin
|
||||
FDataGridSortItems.Remove(SortItem);
|
||||
end
|
||||
else begin
|
||||
SortItem := TSortItem.Create(ColName, sioAscending);
|
||||
if KeyPressed(VK_SHIFT) then
|
||||
SortOrder := sioDescending
|
||||
else
|
||||
SortOrder := sioAscending;
|
||||
SortItem := TSortItem.Create(ColName, SortOrder);
|
||||
FDataGridSortItems.Add(SortItem);
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user