mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 15:36:10 +02:00
LCL: fix resizing the last dbgrid column while the mouse pointer is out of bounds, issue #34032
git-svn-id: trunk@58953 -
This commit is contained in:
parent
abb4caa1b0
commit
49dc72b87e
@ -2704,6 +2704,7 @@ procedure TCustomDBGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
|
|||||||
var
|
var
|
||||||
Gz: TGridZone;
|
Gz: TGridZone;
|
||||||
P: TPoint;
|
P: TPoint;
|
||||||
|
aoe: Boolean;
|
||||||
procedure doMouseDown;
|
procedure doMouseDown;
|
||||||
begin
|
begin
|
||||||
if not Focused and not(csNoFocus in ControlStyle) then
|
if not Focused and not(csNoFocus in ControlStyle) then
|
||||||
@ -2763,7 +2764,18 @@ begin
|
|||||||
CacheMouseDown(X,Y);
|
CacheMouseDown(X,Y);
|
||||||
case Gz of
|
case Gz of
|
||||||
gzInvalid:
|
gzInvalid:
|
||||||
|
begin
|
||||||
|
if (cursor=crHSplit) and (dgColumnResize in Options) then begin
|
||||||
|
// DBGrid normally doesn't allow outbound events and this is one of them
|
||||||
|
// make GCache.HotGridZone valid for inherited mousedown. Issue #0034032
|
||||||
|
aoe := AllowOutboundEvents;
|
||||||
|
AllowOutboundEvents := true;
|
||||||
|
inherited MouseMove(shift, x, y);
|
||||||
|
AllowOutBoundEvents := aoe;
|
||||||
|
doInherited;
|
||||||
|
end else
|
||||||
doMouseDown;
|
doMouseDown;
|
||||||
|
end;
|
||||||
|
|
||||||
gzFixedCells, gzFixedCols:
|
gzFixedCells, gzFixedCols:
|
||||||
doInherited;
|
doInherited;
|
||||||
|
Loading…
Reference in New Issue
Block a user