mirror of
https://github.com/Laex/Delphi-OpenCV.git
synced 2024-11-15 07:45:53 +01:00
parent
ca879602f0
commit
ed324db7f0
@ -358,7 +358,9 @@ procedure TocvCameraSource.SetEnabled(Value: Boolean);
|
||||
begin
|
||||
if FEnabled <> Value then
|
||||
begin
|
||||
if not(csDesigning in ComponentState) then
|
||||
if csDesigning in ComponentState then
|
||||
FEnabled := Value
|
||||
else
|
||||
begin
|
||||
if Assigned(FCapture) and FEnabled then
|
||||
begin
|
||||
@ -367,6 +369,7 @@ begin
|
||||
cvReleaseCapture(FCapture);
|
||||
{$ENDIF}
|
||||
FCapture := Nil;
|
||||
FEnabled := False;
|
||||
end;
|
||||
if Value then
|
||||
begin
|
||||
@ -385,10 +388,10 @@ begin
|
||||
{$ENDIF}
|
||||
(FSourceThread as TocvCaptureThread).Capture := FCapture;
|
||||
FSourceThread.Resume;
|
||||
FEnabled := True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
FEnabled := Value;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user