mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-24 17:30:33 +01:00
LCL, a grid may not be invalidated correctly on col/row resize
git-svn-id: trunk@33058 -
This commit is contained in:
parent
620534553b
commit
0abf333b88
@ -2087,21 +2087,29 @@ end;
|
|||||||
|
|
||||||
procedure TCustomGrid.InternalSetColWidths(aCol, aValue: Integer);
|
procedure TCustomGrid.InternalSetColWidths(aCol, aValue: Integer);
|
||||||
var
|
var
|
||||||
|
OldSize,NewSize: Integer;
|
||||||
R: TRect;
|
R: TRect;
|
||||||
Bigger: boolean;
|
Bigger: boolean;
|
||||||
begin
|
begin
|
||||||
if AValue<0 then
|
NewSize := AValue;
|
||||||
Avalue:=-1;
|
if NewSize<0 then begin
|
||||||
|
AValue:=-1;
|
||||||
|
NewSize := FDefColWidth;
|
||||||
|
end;
|
||||||
|
|
||||||
if Avalue<>integer(PtrUInt(FCols[ACol])) then begin
|
OldSize := integer(PtrUInt(FCols[ACol]));
|
||||||
Bigger := AValue>integer(PtrUInt(FCols[ACol]));
|
if NewSize<>OldSize then begin
|
||||||
SetRawColWidths(ACol, Avalue);
|
|
||||||
|
if OldSize<0 then
|
||||||
|
OldSize := fDefColWidth;
|
||||||
|
|
||||||
|
Bigger := NewSize>OldSize;
|
||||||
|
SetRawColWidths(ACol, AValue);
|
||||||
|
|
||||||
if not (csLoading in ComponentState) and HandleAllocated then begin
|
if not (csLoading in ComponentState) and HandleAllocated then begin
|
||||||
|
|
||||||
if FUpdateCount=0 then begin
|
if FUpdateCount=0 then begin
|
||||||
UpdateSizes;
|
UpdateSizes;
|
||||||
|
|
||||||
R := CellRect(aCol, 0);
|
R := CellRect(aCol, 0);
|
||||||
R.Bottom := FGCache.MaxClientXY.Y+GetBorderWidth+1;
|
R.Bottom := FGCache.MaxClientXY.Y+GetBorderWidth+1;
|
||||||
if UseRightToLeftAlignment then begin
|
if UseRightToLeftAlignment then begin
|
||||||
@ -2518,15 +2526,24 @@ end;
|
|||||||
|
|
||||||
procedure TCustomGrid.Setrowheights(Arow: Integer; Avalue: Integer);
|
procedure TCustomGrid.Setrowheights(Arow: Integer; Avalue: Integer);
|
||||||
var
|
var
|
||||||
|
OldSize,NewSize: Integer;
|
||||||
R: TRect;
|
R: TRect;
|
||||||
Bigger: boolean;
|
Bigger: boolean;
|
||||||
begin
|
begin
|
||||||
if AValue<0 then
|
|
||||||
|
NewSize := AValue;
|
||||||
|
if NewSize<0 then begin
|
||||||
AValue:=-1;
|
AValue:=-1;
|
||||||
|
NewSize := FDefRowHeight;
|
||||||
|
end;
|
||||||
|
|
||||||
if AValue<>integer(PtrUInt(FRows[ARow])) then begin
|
OldSize := integer(PtrUInt(FRows[ARow]));
|
||||||
|
if AValue<>OldSize then begin
|
||||||
|
|
||||||
bigger := aValue > RowHeights[aRow];
|
if OldSize<0 then
|
||||||
|
OldSize := FDefRowHeight;
|
||||||
|
|
||||||
|
bigger := NewSize > OldSize;
|
||||||
|
|
||||||
FRows[ARow]:=Pointer(PtrInt(AValue));
|
FRows[ARow]:=Pointer(PtrInt(AValue));
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user