View Issue Details

IDProjectCategoryView StatusLast Update
0025127LazarusLCLpublic2013-10-02 09:09
Reportermalcome Assigned ToJesus Reyes  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.13 (SVN) 
Target Version1.2.0Fixed in Version1.3 (SVN) 
Summary0025127: Excessive cell button click in Grid component
DescriptionClick blank in grid happens cell button click.
I created a patch.
TagsNo tags attached.
Fixed in Revision43051
LazTarget1.2
WidgetsetWin32/Win64
Attached Files

Activities

malcome

2013-10-01 14:08

reporter  

grids.pas.patch (947 bytes)   
Index: grids.pas
===================================================================
--- grids.pas	(revision 43047)
+++ grids.pas	(working copy)
@@ -5952,6 +5952,9 @@
     end;
   end;
 
+var
+  p: TPoint;
+  obe: boolean;  // stored "AllowOutboundEvents"
 begin
   inherited MouseDown(Button, Shift, X, Y);
 
@@ -6030,8 +6033,17 @@
         FIgnoreClick := False;
         UnlockEditor;
         if IsCellButtonColumn(FGCache.ClickCell) then begin
-          fGridState := gsButtonColumnClicking;
-          DoPushCell;
+          obe := AllowOutboundEvents;
+          AllowOutboundEvents := false;
+          try
+            p := MouseCoord(X, Y);
+          finally
+            AllowOutboundEvents := obe;
+          end;
+          if (p.x >= 0) and (p.y >= 0) then begin
+            fGridState := gsButtonColumnClicking;
+            DoPushCell;
+          end;
           Exit;
         end else
         if FExtendedColSizing and
grids.pas.patch (947 bytes)   

Jesus Reyes

2013-10-01 22:58

developer   ~0070482

Thanks for the patch, I took the opportunity to refactor that part because is used in other place. Please test and close this report if ok.

malcome

2013-10-02 09:09

reporter   ~0070486

Great job. Thanks.

Issue History

Date Modified Username Field Change
2013-10-01 14:08 malcome New Issue
2013-10-01 14:08 malcome File Added: grids.pas.patch
2013-10-01 22:25 Jesus Reyes Assigned To => Jesus Reyes
2013-10-01 22:25 Jesus Reyes Status new => assigned
2013-10-01 22:58 Jesus Reyes Fixed in Revision => 43051
2013-10-01 22:58 Jesus Reyes LazTarget => 1.2
2013-10-01 22:58 Jesus Reyes Note Added: 0070482
2013-10-01 22:58 Jesus Reyes Status assigned => resolved
2013-10-01 22:58 Jesus Reyes Fixed in Version => 1.3 (SVN)
2013-10-01 22:58 Jesus Reyes Resolution open => fixed
2013-10-01 22:58 Jesus Reyes Target Version => 1.2.0
2013-10-02 09:09 malcome Note Added: 0070486
2013-10-02 09:09 malcome Status resolved => closed