industrial: Fix AdvLed not shown when created at runtime.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7148 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-09-02 17:34:51 +00:00
parent 947e735949
commit 4ba6d322a1

View File

@ -161,7 +161,8 @@ begin
FBlinkTimer := TTimer.Create(nil); FBlinkTimer := TTimer.Create(nil);
FBlinkTimer.OnTimer := @DoTimer; FBlinkTimer.OnTimer := @DoTimer;
FBlinkTimer.Enabled := false; FBlinkTimer.Enabled := false;
if (csDesigning in ComponentState) then BitmapNeeded; //if (csDesigning in ComponentState) then
BitmapNeeded;
end; end;
// destroy control // destroy control
@ -176,7 +177,12 @@ end;
// loaded // loaded
procedure TAdvLed.Loaded; procedure TAdvLed.Loaded;
begin begin
inherited;
if FKind <> lkCustom then
BitmapNeeded;
{
Try Try
If (csDesigning in ComponentState) Then Exit ; If (csDesigning in ComponentState) Then Exit ;
// Load Bitmap if necessary // Load Bitmap if necessary
@ -184,6 +190,7 @@ procedure TAdvLed.Loaded;
Finally Finally
inherited Loaded; inherited Loaded;
End; End;
}
end; end;
// timer // timer