mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 12:16:18 +02:00
THeaderControl: properly restore Cursor after we internally changed it. Issue #0026968.
git-svn-id: trunk@46748 -
This commit is contained in:
parent
a42df364db
commit
dcb5b021b5
@ -3661,6 +3661,7 @@ type
|
||||
FEndDragSectionIndex: longint;
|
||||
FSelectedSection: longint;
|
||||
FMouseInControl: Boolean;
|
||||
FSavedCursor: TCursor;
|
||||
|
||||
FOnSectionClick: TCustomSectionNotifyEvent;
|
||||
FOnSectionResize: TCustomSectionNotifyEvent;
|
||||
@ -3677,6 +3678,7 @@ type
|
||||
protected
|
||||
function CreateSection: THeaderSection; virtual;
|
||||
function CreateSections: THeaderSections; virtual;
|
||||
procedure Loaded; override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure SectionClick(Section: THeaderSection); virtual;
|
||||
procedure SectionResize(Section: THeaderSection); virtual;
|
||||
|
@ -74,6 +74,15 @@ begin
|
||||
Result := THeaderSections.Create(Self);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TCustomHeaderControl.Loaded;
|
||||
begin
|
||||
inherited Loaded;
|
||||
FSavedCursor := Cursor;
|
||||
//debugln('TCustomHeaderControl.Loaded: Setting FSavedCursor to ',DbgS(FSavedCursor));
|
||||
end;
|
||||
|
||||
constructor TCustomHeaderControl.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
@ -177,6 +186,8 @@ begin
|
||||
inherited MouseEnter;
|
||||
if not (csDesigning in ComponentState) then
|
||||
begin
|
||||
FSavedCursor := Cursor;
|
||||
//debugln('TCustomHeaderControl.MouseEnter: setting FSavedCursor to ',dbgS(FSavedCursor));
|
||||
FMouseInControl := True;
|
||||
UpdateState;
|
||||
end;
|
||||
@ -267,7 +278,7 @@ begin
|
||||
(GetSectionAt(Point(X - HeaderBorderSize, Y))<>GetSectionAt(Point(X + HeaderBorderSize, Y))) then
|
||||
Cursor:=crSizeE
|
||||
else
|
||||
Cursor:=crDefault;
|
||||
Cursor:=FSavedCursor;
|
||||
UpdateState;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user