LCL, fix dbgrid multiselect issue #12462

git-svn-id: trunk@17130 -
This commit is contained in:
jesus 2008-10-24 18:48:33 +00:00
parent 8f3ab8527b
commit d66de2be79

View File

@ -111,11 +111,18 @@ type
type
{ TBMStringList }
TBMStringList = class (TStringList)
protected
function DoCompareText(const s1,s2 : string) : PtrInt; override;
end;
{ TBookmarkList }
TBookmarkList=class
private
FList: TStringlist;
FList: TBMStringList;
FGrid: TCustomDbGrid;
function GetCount: integer;
function GetCurrentRowSelected: boolean;
@ -3463,7 +3470,7 @@ constructor TBookmarkList.Create(AGrid: TCustomDBGrid);
begin
inherited Create;
FGrid := AGrid;
FList := TStringList.Create;
FList := TBMStringList.Create;
FList.CaseSensitive:=True;
FList.Sorted:=True;
end;
@ -3528,6 +3535,19 @@ begin
FGrid.Invalidate;
end;
{ TBMStringList }
function TBMStringList.DoCompareText(const s1, s2: string): PtrInt;
begin
if Length(s1)<Length(s2) then
result := -1
else
if Length(s1)>Length(s2) then
result := 1
else
result := CompareMemRange(@s1[1],@s2[1], Length(s1));
end;
initialization
{$I lcl_dbgrid_images.lrs}