* Enable TDatasource.Enabled, patch from Laco

git-svn-id: trunk@49630 -
This commit is contained in:
michael 2021-07-22 05:50:22 +00:00
parent b9db32ca05
commit c48ac0a71e

View File

@ -639,6 +639,7 @@ procedure TDatasource.SetEnabled(Value: Boolean);
begin begin
FEnabled:=Value; FEnabled:=Value;
ProcessEvent(deUpdateState,0);
end; end;
@ -679,7 +680,7 @@ procedure TDataSource.ProcessEvent(Event : TDataEvent; Info : Ptrint);
Const Const
OnDataChangeEvents = [deRecordChange, deDataSetChange, deDataSetScroll, OnDataChangeEvents = [deRecordChange, deDataSetChange, deDataSetScroll,
deLayoutChange,deUpdateState]; deLayoutChange, deUpdateState];
Var Var
NeedDataChange : Boolean; NeedDataChange : Boolean;
@ -691,7 +692,7 @@ begin
begin begin
NeedDataChange:=(FState=dsInactive); NeedDataChange:=(FState=dsInactive);
FLastState:=FState; FLastState:=FState;
If Assigned(Dataset) then If Assigned(Dataset) and FEnabled then
FState:=Dataset.State FState:=Dataset.State
else else
FState:=dsInactive; FState:=dsInactive;