Permalink
Browse files

lcl: reset Brush.Style from bsClear to bsSolid if SetColor() is calle…

…d (issue #0021759)

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@36809 4005530d-fff6-0310-9dd1-cebe43e6787f
  • Loading branch information...
1 parent e973c90 commit 336aed4a3ab00d193222d91c2d709029f12b866c paul committed Apr 16, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lcl/include/brush.inc
@@ -41,8 +41,7 @@ end;
------------------------------------------------------------------------------}
procedure TBrush.SetColor(Value: TColor);
begin
- if FColor <> Value then
- SetColor(Value, TColorToFPColor(Value));
+ SetColor(Value, TColorToFPColor(Value));
end;
{------------------------------------------------------------------------------
@@ -296,7 +295,7 @@ end;
procedure TBrush.SetColor(const NewColor: TColor; const NewFPColor: TFPColor);
begin
- if (NewColor = Color) and (NewFPColor = FPColor) then Exit;
+ if (NewColor = Color) and (NewFPColor = FPColor) and (Style <> bsClear) then Exit;
FreeReference;
// reset bitmap
FBitmap := nil;

0 comments on commit 336aed4

Please sign in to comment.