mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-21 20:45:58 +02:00
Merged revision(s) 57005 #b63451bdf7 from trunk:
Grids: factor out IsEmptyRow function and correctly use the ARow paramter inside the function. Issue #0032965. ........ git-svn-id: branches/fixes_1_8@57034 -
This commit is contained in:
parent
d53fad6c86
commit
8fd8b1ab7c
@ -1075,6 +1075,7 @@ type
|
|||||||
procedure InvalidateFocused;
|
procedure InvalidateFocused;
|
||||||
function GetIsCellTitle(aCol,aRow: Integer): boolean; virtual;
|
function GetIsCellTitle(aCol,aRow: Integer): boolean; virtual;
|
||||||
function GetIsCellSelected(aCol, aRow: Integer): boolean; virtual;
|
function GetIsCellSelected(aCol, aRow: Integer): boolean; virtual;
|
||||||
|
function IsEmptyRow(ARow: Integer): Boolean;
|
||||||
function IsMouseOverCellButton(X,Y: Integer): boolean;
|
function IsMouseOverCellButton(X,Y: Integer): boolean;
|
||||||
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
|
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
|
||||||
procedure KeyUp(var Key : Word; Shift : TShiftState); override;
|
procedure KeyUp(var Key : Word; Shift : TShiftState); override;
|
||||||
@ -5244,7 +5245,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomGrid.GetDefColWidth: integer;
|
function TCustomGrid.IsEmptyRow(ARow: Integer): Boolean;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
for i:=FixedCols to ColCount-1 do
|
||||||
|
if GetCells(i, ARow)<>'' then begin
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TCustomGrid.GetDefColWidth: Integer;
|
||||||
begin
|
begin
|
||||||
if FDefColWidth<0 then
|
if FDefColWidth<0 then
|
||||||
begin
|
begin
|
||||||
@ -5255,7 +5268,7 @@ begin
|
|||||||
Result := FDefColWidth;
|
Result := FDefColWidth;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomGrid.GetDefRowHeight: integer;
|
function TCustomGrid.GetDefRowHeight: Integer;
|
||||||
begin
|
begin
|
||||||
if FDefRowHeight<0 then
|
if FDefRowHeight<0 then
|
||||||
begin
|
begin
|
||||||
@ -7138,18 +7151,6 @@ var
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function IsEmptyRow(ARow: Integer): Boolean;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
Result := False;
|
|
||||||
for i:=FixedCols to ColCount-1 do
|
|
||||||
if GetCells(i, FRow)<>'' then begin
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
Result := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
const
|
const
|
||||||
cBidiMove: array[Boolean] of Integer = (1, -1);
|
cBidiMove: array[Boolean] of Integer = (1, -1);
|
||||||
begin
|
begin
|
||||||
@ -7482,18 +7483,6 @@ var
|
|||||||
NCol,NRow: Integer;
|
NCol,NRow: Integer;
|
||||||
SelOk: Boolean;
|
SelOk: Boolean;
|
||||||
|
|
||||||
function IsEmptyRow(ARow: Integer): Boolean;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
Result := False;
|
|
||||||
for i:=FixedCols to ColCount-1 do
|
|
||||||
if GetCells(i, FRow)<>'' then begin
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
Result := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
// Reference
|
// Reference
|
||||||
if not Relative then begin
|
if not Relative then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user