mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 22:20:25 +02:00
LCL, fix grid row moving indicator when new position is the same as the old one, issue #20084
git-svn-id: trunk@32241 -
This commit is contained in:
parent
73d34d3088
commit
030bda5204
@ -3534,15 +3534,14 @@ begin
|
|||||||
dx := 4;
|
dx := 4;
|
||||||
dy := 4;
|
dy := 4;
|
||||||
Canvas.pen.Width := 1;
|
Canvas.pen.Width := 1;
|
||||||
Canvas.Pen.Color := clHighlight;
|
Canvas.Pen.Color := clBlack;
|
||||||
Canvas.Brush.Color := clHighlight;
|
Canvas.Brush.Color := clWhite;
|
||||||
R := CellRect(FMoveLast.X, 0);
|
R := CellRect(FMoveLast.X, 0);
|
||||||
X := R.Left;
|
Y := R.Top + (R.Bottom-R.Top) div 2;
|
||||||
Y := R.Bottom - dy;
|
X := R.Left - 2*dx;
|
||||||
//TODO need Bidi
|
Canvas.Polygon([Point(x,y+dy),point(x,y-dy),point(x+dx,y), point(x,y+dy)]);
|
||||||
Canvas.Polygon([Point(x-dx,y),point(x+dx,y),point(x,y+dy), point(x-dx,y)]);
|
X := R.Left + 2*dx;
|
||||||
Y := R.Top + dy;
|
Canvas.Polygon([Point(x,y+dy),point(x,y-dy),point(x-dx,y), point(x,y+dy)]);
|
||||||
Canvas.Polygon([Point(x-dx,y),point(x+dx,y),point(x,y-dy), point(x-dx,y)]);
|
|
||||||
{$else}
|
{$else}
|
||||||
Canvas.Pen.Width:=3;
|
Canvas.Pen.Width:=3;
|
||||||
Canvas.Pen.Color:=clRed;
|
Canvas.Pen.Color:=clRed;
|
||||||
@ -3556,14 +3555,14 @@ begin
|
|||||||
dx := 4;
|
dx := 4;
|
||||||
dy := 4;
|
dy := 4;
|
||||||
Canvas.pen.Width := 1;
|
Canvas.pen.Width := 1;
|
||||||
Canvas.Pen.Color := clHighlight;
|
Canvas.Pen.Color := clBlack;
|
||||||
Canvas.Brush.Color := clHighlight;
|
Canvas.Brush.Color := clWhite;
|
||||||
R := CellRect(0, FMoveLast.Y);
|
R := CellRect(0, FMoveLast.Y);
|
||||||
X := R.Right - dx;
|
X := R.Left + (R.Right-R.Left) div 2;
|
||||||
Y := R.Top;
|
Y := R.Top - 2*dy;
|
||||||
Canvas.Polygon([Point(x,y+dy),point(x,y-dy),point(x+dx,y), point(x,y+dy)]);
|
Canvas.Polygon([Point(x-dx,y),point(x+dx,y),point(x,y+dy), point(x-dx,y)]);
|
||||||
X := R.Left + dx;
|
Y := R.Top + 2*dy;
|
||||||
Canvas.Polygon([Point(x,y+dy),point(x,y-dy),point(x-dx,y), point(x,y+dy)]);
|
Canvas.Polygon([Point(x-dx,y),point(x+dx,y),point(x,y-dy), point(x-dx,y)]);
|
||||||
{$else}
|
{$else}
|
||||||
Canvas.Pen.Width:=3;
|
Canvas.Pen.Width:=3;
|
||||||
Canvas.Pen.Color:=clRed;
|
Canvas.Pen.Color:=clRed;
|
||||||
@ -5918,6 +5917,12 @@ begin
|
|||||||
begin
|
begin
|
||||||
//DebugLn('Move Row From ',Fsplitter.Y,' to ', FMoveLast.Y);
|
//DebugLn('Move Row From ',Fsplitter.Y,' to ', FMoveLast.Y);
|
||||||
if FMoveLast.Y>=0 then begin
|
if FMoveLast.Y>=0 then begin
|
||||||
|
if FMoveLast.Y=FGCache.ClickCell.Y then
|
||||||
|
{$ifdef AlternativeMoveIndicator}
|
||||||
|
InvalidateCol(0);
|
||||||
|
{$else}
|
||||||
|
Invalidate;
|
||||||
|
{$endif}
|
||||||
DoOPMoveColRow(False, FGCache.ClickCell.Y, FMoveLast.Y);
|
DoOPMoveColRow(False, FGCache.ClickCell.Y, FMoveLast.Y);
|
||||||
ChangeCursor;
|
ChangeCursor;
|
||||||
end else
|
end else
|
||||||
|
Loading…
Reference in New Issue
Block a user