View Issue Details

IDProjectCategoryView StatusLast Update
0000443Double CommanderDefaultpublic2016-06-26 12:02
ReporterCyrax Assigned Tocobines  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
ProjectionnoneETAnone 
Fixed in Version0.5.5 
Summary0000443: Annoying bug in "Configure custom columns view" dialog.
DescriptionWhenever user clicks on any row in width column and then clicks on another one, value from previous row is copied onto it.

Attached patch (fcolumnssetconf.pas.patch) fixes this.
TagsNo tags attached.
Attached Files
fcolumnssetconf.pas.patch (1,377 bytes)   
Index: src/fcolumnssetconf.pas
===================================================================
--- src/fcolumnssetconf.pas	(revision 4680)
+++ src/fcolumnssetconf.pas	(working copy)
@@ -166,6 +166,7 @@
       var Editor: TWinControl);
 
     {Editors}
+    procedure SpinEditEnter(Sender: TObject);
     procedure SpinEditExit(Sender: TObject);
     procedure SpinEditChange(Sender: TObject);
     procedure EditExit(Sender: TObject);
@@ -331,7 +332,6 @@
              Top:=(Sender as TStringGrid).CellRect(aCol,aRow).Top;
              Height:=(Sender as TStringGrid).RowHeights[aRow];
              Width:=(Sender as TStringGrid).ColWidths[aCol];
-             Value:=StrToInt((Sender as TStringGrid).Cells[aCol,aRow]);
            end;
          Editor:=updWidth;
        end;
@@ -550,6 +550,7 @@
      OnKeyDown := @EditorKeyDown;
      OnChange := @SpinEditChange;
      OnExit := @SpinEditExit;
+     OnEnter := @SpinEditEnter;
   end;
 
 
@@ -657,6 +658,15 @@
   AddNewField;
 end;
 
+procedure TfColumnsSetConf.SpinEditEnter(Sender : TObject);
+Var
+  ARow, ACol : Integer;
+Begin
+  ACol := StrToIntDef((Sender as TSpinEdit).Hint, 0);
+  ARow := (Sender as TSpinEdit).Tag;
+  (Sender as TSpinEdit).Value :=  StrToIntDef(stgColumns.Cells[aCol,aRow], 0);
+end;
+
 procedure TfColumnsSetConf.SpinEditExit(Sender: TObject);
 begin
   EditorSaveResult(Sender);
fcolumnssetconf.pas.patch (1,377 bytes)   
Fixed in Revision4687
Operating systemWindows
WidgetsetWin32
Architecture64-bit

Activities

cobines

2012-04-26 15:22

administrator   ~0000628

It's due to changes in Lazarus trunk. Now OnChange is called when Value is changed. I resolved it in a different way.

Issue History

Date Modified Username Field Change
2012-04-25 09:11 Cyrax New Issue
2012-04-25 09:11 Cyrax File Added: fcolumnssetconf.pas.patch
2012-04-26 15:22 cobines Fixed in Revision => 4687
2012-04-26 15:22 cobines Note Added: 0000628
2012-04-26 15:22 cobines Status new => resolved
2012-04-26 15:22 cobines Fixed in Version => 0.5.5
2012-04-26 15:22 cobines Resolution open => fixed
2012-04-26 15:22 cobines Assigned To => cobines
2016-06-26 12:02 Alexx2000 Status resolved => closed