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;
|
kind: Integer;
|
||||||
protected
|
protected
|
||||||
procedure InternalPost; override;
|
procedure InternalPost; override;
|
||||||
|
procedure InternalRefresh; override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent; PostCallback: TAsyncPostRunner); reintroduce;
|
constructor Create(AOwner: TComponent; PostCallback: TAsyncPostRunner); reintroduce;
|
||||||
procedure ExecSQL; override;
|
procedure ExecSQL; override;
|
||||||
@ -92,6 +93,13 @@ begin
|
|||||||
else callback(self);
|
else callback(self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TDeferDataSet.InternalRefresh;
|
||||||
|
begin
|
||||||
|
kind := 3;
|
||||||
|
if @callback = nil then DoAsync
|
||||||
|
else callback(self);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TDeferDataSet.ExecSql;
|
procedure TDeferDataSet.ExecSql;
|
||||||
begin
|
begin
|
||||||
kind := 2;
|
kind := 2;
|
||||||
@ -110,6 +118,7 @@ begin
|
|||||||
case kind of
|
case kind of
|
||||||
1: inherited InternalPost;
|
1: inherited InternalPost;
|
||||||
2: inherited ExecSQL;
|
2: inherited ExecSQL;
|
||||||
|
3: inherited InternalRefresh;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user