mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Unify code for refreshing Virtual Trees in a new helper method InvalidateVT. Fixes issue #1789 and issue #1790.
* Don't try to access a passed tree if it has been destroyed by some earlier event. * Don't try to access registry in DoDisconnect after key has been closed. * Now that DoDisconnect lives in FormDestroy it is save to call it slightly earlier, before registry has been closed. There should be no later paint events which will trigger random database queries.
This commit is contained in:
@ -315,8 +315,7 @@ procedure TDataSortingForm.btnOKClick(Sender: TObject);
|
||||
begin
|
||||
// TODO: apply ordering
|
||||
Mainform.DataGridSortColumns := OrderColumns;
|
||||
Mainform.DataGrid.Tag := VTREE_NOTLOADED_PURGECACHE;
|
||||
Mainform.DataGrid.Invalidate;
|
||||
InvalidateVT(Mainform.DataGrid, VTREE_NOTLOADED_PURGECACHE, False);
|
||||
btnCancel.OnClick(Sender);
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user