From: <ah...@us...> - 2007-10-31 11:17:40
|
Revision: 11552 http://jvcl.svn.sourceforge.net/jvcl/?rev=11552&view=rev Author: ahuser Date: 2007-10-31 04:17:38 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Mantis #4274: Bug in implementation of sort in TJvStringGrid.SortGridByCols (Mantis #4274) Modified Paths: -------------- trunk/jvcl/run/JvStringGrid.pas Modified: trunk/jvcl/run/JvStringGrid.pas =================================================================== --- trunk/jvcl/run/JvStringGrid.pas 2007-10-31 11:06:57 UTC (rev 11551) +++ trunk/jvcl/run/JvStringGrid.pas 2007-10-31 11:17:38 UTC (rev 11552) @@ -138,6 +138,8 @@ procedure DefaultDrawCell(AColumn, ARow: Longint; Rect: TRect; State: TGridDrawState); virtual; procedure ActivateCell(AColumn, ARow: Integer); + + // protected => public procedure InvalidateCell(AColumn, ARow: Integer); procedure InvalidateCol(AColumn: Integer); procedure InvalidateRow(ARow: Integer); @@ -1367,11 +1369,6 @@ end; begin - // (p3) is this really necessary? Doesn't seem so to me... - // No, it isn't... Removed by Dom - //if SizeOf(ColOrder) div SizeOf(I) <> ColCount then - // Exit; - for I := 0 to High(ColOrder) do if (ColOrder[I] < 0) or (ColOrder[I] >= ColCount) then Exit; @@ -1382,7 +1379,7 @@ FirstRow := FixedRows; J := FirstRow; - Sorted := False; + Sorted := True; repeat Inc(J); for I := FirstRow to RowCount - 2 do This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |