View Issue Details

IDProjectCategoryView StatusLast Update
0029243LazarusLCLpublic2015-12-31 20:00
ReporterMichlAssigned ToOndrej Pokorny 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOS7OS Version32bit
Product Version1.5 (SVN)Product Build51002 
Target Version1.6Fixed in Version1.7 (SVN) 
Summary0029243: [Patch] Wrong Alignment in TCustomGrid for Editor with Columns
DescriptionIf Columns are defined in a grid, the Alignment is taken from the wrong Column, if there are some fixed Cols defined.
Steps To ReproduceA project is attached with a DBGrid and two TStringGrids with Columns. Try to edit the Columns with the numbers and you will see that bug.
Tagspatch
Fixed in Revision51092
LazTarget1.6
WidgetsetWin32/Win64
Attached Files
  • grids.pas.patch (515 bytes)
    Index: lcl/grids.pas
    ===================================================================
    --- lcl/grids.pas	(revision 51002)
    +++ lcl/grids.pas	(working copy)
    @@ -6640,8 +6640,8 @@
         Editor.Parent:=Self;
       if FEditor=FStringEditor then
       begin
    -    if FCol<Columns.Count then
    -      FStringEditor.Alignment:=Columns[FCol].Alignment
    +    if FCol-FFixedCols<Columns.Count then
    +      FStringEditor.Alignment:=Columns[FCol-FFixedCols].Alignment
         else
           FStringEditor.Alignment:=taLeftJustify;
       end;
    
    grids.pas.patch (515 bytes)
  • Testproject.zip (2,556 bytes)

Activities

Michl

2015-12-23 11:22

developer  

grids.pas.patch (515 bytes)
Index: lcl/grids.pas
===================================================================
--- lcl/grids.pas	(revision 51002)
+++ lcl/grids.pas	(working copy)
@@ -6640,8 +6640,8 @@
     Editor.Parent:=Self;
   if FEditor=FStringEditor then
   begin
-    if FCol<Columns.Count then
-      FStringEditor.Alignment:=Columns[FCol].Alignment
+    if FCol-FFixedCols<Columns.Count then
+      FStringEditor.Alignment:=Columns[FCol-FFixedCols].Alignment
     else
       FStringEditor.Alignment:=taLeftJustify;
   end;
grids.pas.patch (515 bytes)

Michl

2015-12-23 11:23

developer  

Testproject.zip (2,556 bytes)

Michl

2015-12-28 21:47

developer   ~0088371

This bug comes with revision 50874.

Zeljan Rikalo

2015-12-29 19:19

developer   ~0088412

Ondrej, I've assigned this issue to you since you're commiter of r50874 which caused regression according to reporter.

Ondrej Pokorny

2015-12-31 10:57

reporter   ~0088454

@Zeljko: correct, thanks!

@Michl: applied, thanks!

Michl

2015-12-31 20:00

developer   ~0088484

Thank you!

Issue History

Date Modified Username Field Change
2015-12-23 11:22 Michl New Issue
2015-12-23 11:22 Michl File Added: grids.pas.patch
2015-12-23 11:23 Michl File Added: Testproject.zip
2015-12-28 21:47 Michl Note Added: 0088371
2015-12-28 21:47 Michl Tag Attached: patch
2015-12-29 19:19 Zeljan Rikalo LazTarget => -
2015-12-29 19:19 Zeljan Rikalo Note Added: 0088412
2015-12-29 19:19 Zeljan Rikalo Assigned To => Ondrej Pokorny
2015-12-29 19:19 Zeljan Rikalo Status new => assigned
2015-12-31 10:57 Ondrej Pokorny Fixed in Revision => 51092
2015-12-31 10:57 Ondrej Pokorny LazTarget - => 1.6
2015-12-31 10:57 Ondrej Pokorny Note Added: 0088454
2015-12-31 10:57 Ondrej Pokorny Status assigned => resolved
2015-12-31 10:57 Ondrej Pokorny Fixed in Version => 1.7 (SVN)
2015-12-31 10:57 Ondrej Pokorny Resolution open => fixed
2015-12-31 10:57 Ondrej Pokorny Target Version => 1.6
2015-12-31 20:00 Michl Note Added: 0088484
2015-12-31 20:00 Michl Status resolved => closed