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;
|
frm: TForm;
|
||||||
ColName: String;
|
ColName: String;
|
||||||
SortItem: TSortItem;
|
SortItem: TSortItem;
|
||||||
|
SortOrder: TSortItemOrder;
|
||||||
begin
|
begin
|
||||||
if HitInfo.Column = NoColumn then
|
if HitInfo.Column = NoColumn then
|
||||||
Exit;
|
Exit;
|
||||||
@ -10312,7 +10313,11 @@ begin
|
|||||||
FDataGridSortItems.Remove(SortItem);
|
FDataGridSortItems.Remove(SortItem);
|
||||||
end
|
end
|
||||||
else begin
|
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);
|
FDataGridSortItems.Add(SortItem);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user