View Issue Details

IDProjectCategoryView StatusLast Update
0021762LazarusLCLpublic2012-04-16 08:04
ReporterDavid JenkinsAssigned ToPaul Ishenin 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version0.9.30.5 (SVN)Product Build 
Target VersionFixed in Version1.1 (SVN) 
Summary0021762: Clear TBrush Bitmap property when color or style is changed
DescriptionWe are seeing drawing that carries over a brush bitmap from a previous operation. Delphi clears that bitmap when TBrush Color or Style is set. We'd like to match that.

See attached patch against rev 36681
TagsNo tags attached.
Fixed in Revision36807
LazTarget-
Widgetset
Attached Files
  • brush.inc.patch (508 bytes)
    --- /Users/djenkins/laz-changes/14684/brush.inc	2012-04-11 14:38:07.000000000 
    +++ /Users/djenkins/laz-changes/14684/brush.inc.ss	2012-04-11 14:39:15.000000000 
    @@ -57,6 +57,7 @@
       if Style <> Value then
       begin
         FreeReference;
    +    FBitmap := nil;
         inherited SetStyle(Value);
         Changed;
       end;
    @@ -290,6 +291,7 @@
     begin
       if (NewColor = Color) and (NewFPColor = FPColor) then Exit;
       FreeReference;
    +  FBitmap := nil;
       FColor := NewColor;
       inherited SetFPColor(NewFPColor);
       Changed;
    
    brush.inc.patch (508 bytes)

Activities

2012-04-13 22:48

 

brush.inc.patch (508 bytes)
--- /Users/djenkins/laz-changes/14684/brush.inc	2012-04-11 14:38:07.000000000 
+++ /Users/djenkins/laz-changes/14684/brush.inc.ss	2012-04-11 14:39:15.000000000 
@@ -57,6 +57,7 @@
   if Style <> Value then
   begin
     FreeReference;
+    FBitmap := nil;
     inherited SetStyle(Value);
     Changed;
   end;
@@ -290,6 +291,7 @@
 begin
   if (NewColor = Color) and (NewFPColor = FPColor) then Exit;
   FreeReference;
+  FBitmap := nil;
   FColor := NewColor;
   inherited SetFPColor(NewFPColor);
   Changed;
brush.inc.patch (508 bytes)

Paul Ishenin

2012-04-16 08:04

manager   ~0058643

I've changed a bit more: I also reset color and style on bitmap assigning. Also Assign() call expose only 1 Change event.

Please test and close if ok.

Issue History

Date Modified Username Field Change
2012-04-13 22:48 David Jenkins New Issue
2012-04-13 22:48 David Jenkins File Added: brush.inc.patch
2012-04-16 08:04 Paul Ishenin Fixed in Revision => 36807
2012-04-16 08:04 Paul Ishenin LazTarget => -
2012-04-16 08:04 Paul Ishenin Status new => resolved
2012-04-16 08:04 Paul Ishenin Fixed in Version => 1.1 (SVN)
2012-04-16 08:04 Paul Ishenin Resolution open => fixed
2012-04-16 08:04 Paul Ishenin Assigned To => Paul Ishenin
2012-04-16 08:04 Paul Ishenin Note Added: 0058643