mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-17 04:40:18 +08:00
Call VT.Clear before filling it rather than manually calling ReInitNode after filling data. Seems more consistent and less hackish.
This commit is contained in:
@ -2580,6 +2580,8 @@ begin
|
|||||||
Screen.Cursor := crSQLWait;
|
Screen.Cursor := crSQLWait;
|
||||||
|
|
||||||
// VARIABLES
|
// VARIABLES
|
||||||
|
ListVariables.BeginUpdate;
|
||||||
|
ListVariables.Clear;
|
||||||
ds := GetResults( 'SHOW VARIABLES', false );
|
ds := GetResults( 'SHOW VARIABLES', false );
|
||||||
SetLength( VTRowDataListVariables, ds.RecordCount );
|
SetLength( VTRowDataListVariables, ds.RecordCount );
|
||||||
for i:=1 to ds.RecordCount do
|
for i:=1 to ds.RecordCount do
|
||||||
@ -2615,14 +2617,15 @@ begin
|
|||||||
|
|
||||||
// Tell VirtualTree the number of nodes it will display
|
// Tell VirtualTree the number of nodes it will display
|
||||||
ListVariables.RootNodeCount := Length(VTRowDataListVariables);
|
ListVariables.RootNodeCount := Length(VTRowDataListVariables);
|
||||||
ListVariables.ReinitNode(nil, true);
|
|
||||||
// Manually invoke sorting
|
// Manually invoke sorting
|
||||||
ListVariables.SortTree( ListVariables.Header.SortColumn, ListVariables.Header.SortDirection );
|
ListVariables.SortTree( ListVariables.Header.SortColumn, ListVariables.Header.SortDirection );
|
||||||
|
ListVariables.EndUpdate;
|
||||||
// Display number of listed values on tab
|
// Display number of listed values on tab
|
||||||
tabVariables.Caption := 'Variables (' + IntToStr(ListVariables.RootNodeCount) + ')';
|
tabVariables.Caption := 'Variables (' + IntToStr(ListVariables.RootNodeCount) + ')';
|
||||||
|
|
||||||
// Command-Statistics
|
// Command-Statistics
|
||||||
ListCommandStats.BeginUpdate;
|
ListCommandStats.BeginUpdate;
|
||||||
|
ListCommandStats.Clear;
|
||||||
SetLength( VTRowDataListCommandStats, 0 );
|
SetLength( VTRowDataListCommandStats, 0 );
|
||||||
addLVitem( ' All commands', questions, questions );
|
addLVitem( ' All commands', questions, questions );
|
||||||
ds.First;
|
ds.First;
|
||||||
@ -2637,7 +2640,6 @@ begin
|
|||||||
|
|
||||||
// Tell VirtualTree the number of nodes it will display
|
// Tell VirtualTree the number of nodes it will display
|
||||||
ListCommandStats.RootNodeCount := Length(VTRowDataListCommandStats);
|
ListCommandStats.RootNodeCount := Length(VTRowDataListCommandStats);
|
||||||
ListCommandStats.ReinitNode(nil, true);
|
|
||||||
// Manually invoke sorting
|
// Manually invoke sorting
|
||||||
ListCommandStats.SortTree( ListCommandStats.Header.SortColumn, ListCommandStats.Header.SortDirection );
|
ListCommandStats.SortTree( ListCommandStats.Header.SortColumn, ListCommandStats.Header.SortDirection );
|
||||||
ListCommandStats.EndUpdate;
|
ListCommandStats.EndUpdate;
|
||||||
|
Reference in New Issue
Block a user