mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 02:47:55 +02:00
* Enable TDatasource.Enabled, patch from Laco
git-svn-id: trunk@49630 -
This commit is contained in:
parent
b9db32ca05
commit
c48ac0a71e
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user