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