mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Switch ListColumns from TSortListView to TVirtualStringTree
Additionally/Sideeffects: - Fix vstFreeNode to delete the item from the array, not only free the item itself - Change/Rename GetSelectedNodesFromVT to GetVTCaptions and give it the ability to return all captions, not only the selected. This function is very useful now and saves writing much redundant code. A table with 500 columns needed 3 seconds to display in the TSortListView, now that takes less than a half second.
This commit is contained in:
@ -49,7 +49,7 @@ const
|
||||
|
||||
implementation
|
||||
|
||||
uses main;
|
||||
uses main, helpers;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
@ -64,11 +64,7 @@ var
|
||||
reg : TRegistry;
|
||||
begin
|
||||
// Take column names from listColumns and add here
|
||||
ColumnNames := TStringList.Create;
|
||||
for i := 0 to Mainform.Childwin.listColumns.Items.Count-1 do
|
||||
begin
|
||||
ColumnNames.Add( Mainform.Childwin.listColumns.Items[i].Caption );
|
||||
end;
|
||||
ColumnNames := GetVTCaptions( Mainform.Childwin.ListColumns );
|
||||
|
||||
// Read original ORDER clause from registry
|
||||
reg := TRegistry.Create();
|
||||
|
Reference in New Issue
Block a user