mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Pipe calls to InternalRefresh through the query thread.
This commit is contained in:
@ -73,6 +73,7 @@ type
|
||||
kind: Integer;
|
||||
protected
|
||||
procedure InternalPost; override;
|
||||
procedure InternalRefresh; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent; PostCallback: TAsyncPostRunner); reintroduce;
|
||||
procedure ExecSQL; override;
|
||||
@ -92,6 +93,13 @@ begin
|
||||
else callback(self);
|
||||
end;
|
||||
|
||||
procedure TDeferDataSet.InternalRefresh;
|
||||
begin
|
||||
kind := 3;
|
||||
if @callback = nil then DoAsync
|
||||
else callback(self);
|
||||
end;
|
||||
|
||||
procedure TDeferDataSet.ExecSql;
|
||||
begin
|
||||
kind := 2;
|
||||
@ -110,6 +118,7 @@ begin
|
||||
case kind of
|
||||
1: inherited InternalPost;
|
||||
2: inherited ExecSQL;
|
||||
3: inherited InternalRefresh;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user