mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-28 09:56:19 +02:00
lcl: grids: ignore WMSIZE when updating scrollbars. Solves part of issue #31715
git-svn-id: trunk@54817 -
This commit is contained in:
parent
43e271b439
commit
76e4dccfaa
@ -155,7 +155,7 @@ type
|
|||||||
TGridFlagsOption = (gfEditorUpdateLock, gfNeedsSelectActive, gfEditorTab,
|
TGridFlagsOption = (gfEditorUpdateLock, gfNeedsSelectActive, gfEditorTab,
|
||||||
gfRevEditorTab, gfVisualChange, gfColumnsLocked,
|
gfRevEditorTab, gfVisualChange, gfColumnsLocked,
|
||||||
gfEditingDone, gfSizingStarted, gfPainting, gfUpdatingSize, gfClientRectChange,
|
gfEditingDone, gfSizingStarted, gfPainting, gfUpdatingSize, gfClientRectChange,
|
||||||
gfAutoEditPending);
|
gfAutoEditPending, gfUpdatingScrollbar);
|
||||||
TGridFlags = set of TGridFlagsOption;
|
TGridFlags = set of TGridFlagsOption;
|
||||||
|
|
||||||
TSortOrder = (soAscending, soDescending);
|
TSortOrder = (soAscending, soDescending);
|
||||||
@ -1122,6 +1122,7 @@ type
|
|||||||
procedure UpdateBorderStyle;
|
procedure UpdateBorderStyle;
|
||||||
function ValidateEntry(const ACol,ARow:Integer; const OldValue:string; var NewValue:string): boolean; virtual;
|
function ValidateEntry(const ACol,ARow:Integer; const OldValue:string; var NewValue:string): boolean; virtual;
|
||||||
procedure VisualChange; virtual;
|
procedure VisualChange; virtual;
|
||||||
|
procedure WMSize(var Message: TLMSize); message LM_SIZE;
|
||||||
procedure WMHScroll(var message : TLMHScroll); message LM_HSCROLL;
|
procedure WMHScroll(var message : TLMHScroll); message LM_HSCROLL;
|
||||||
procedure WMVScroll(var message : TLMVScroll); message LM_VSCROLL;
|
procedure WMVScroll(var message : TLMVScroll); message LM_VSCROLL;
|
||||||
procedure WMKillFocus(var message: TLMKillFocus); message LM_KILLFOCUS;
|
procedure WMKillFocus(var message: TLMKillFocus); message LM_KILLFOCUS;
|
||||||
@ -3305,7 +3306,12 @@ begin
|
|||||||
{$Ifdef DbgScroll}
|
{$Ifdef DbgScroll}
|
||||||
DebugLn('ScrollbarShow: Which=',SbToStr(Which), ' Avalue=',dbgs(AValue));
|
DebugLn('ScrollbarShow: Which=',SbToStr(Which), ' Avalue=',dbgs(AValue));
|
||||||
{$endif}
|
{$endif}
|
||||||
ShowScrollBar(Handle,Which,aValue);
|
Include(FGridFlags, gfUpdatingScrollbar);
|
||||||
|
try
|
||||||
|
ShowScrollBar(Handle,Which,aValue);
|
||||||
|
finally
|
||||||
|
Exclude(FGridFlags, gfUpdatingScrollbar);
|
||||||
|
end;
|
||||||
if Which in [SB_BOTH, SB_VERT] then FVSbVisible := Ord(AValue);
|
if Which in [SB_BOTH, SB_VERT] then FVSbVisible := Ord(AValue);
|
||||||
if Which in [SB_BOTH, SB_HORZ] then FHSbVisible := Ord(AValue);
|
if Which in [SB_BOTH, SB_HORZ] then FHSbVisible := Ord(AValue);
|
||||||
end;
|
end;
|
||||||
@ -4610,6 +4616,13 @@ begin
|
|||||||
InvalidateFocused;
|
InvalidateFocused;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomGrid.WMSize(var Message: TLMSize);
|
||||||
|
begin
|
||||||
|
if gfUpdatingScrollbar in FGridFlags then // ignore WMSize when updating scrollbars. issue #31715
|
||||||
|
Exit;
|
||||||
|
inherited WMSize(Message);
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TCustomGrid.WSRegisterClass;
|
class procedure TCustomGrid.WSRegisterClass;
|
||||||
begin
|
begin
|
||||||
inherited WSRegisterClass;
|
inherited WSRegisterClass;
|
||||||
|
Loading…
Reference in New Issue
Block a user