mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 09:59:20 +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;
|
FEndDragSectionIndex: longint;
|
||||||
FSelectedSection: longint;
|
FSelectedSection: longint;
|
||||||
FMouseInControl: Boolean;
|
FMouseInControl: Boolean;
|
||||||
|
FSavedCursor: TCursor;
|
||||||
|
|
||||||
FOnSectionClick: TCustomSectionNotifyEvent;
|
FOnSectionClick: TCustomSectionNotifyEvent;
|
||||||
FOnSectionResize: TCustomSectionNotifyEvent;
|
FOnSectionResize: TCustomSectionNotifyEvent;
|
||||||
@ -3677,6 +3678,7 @@ type
|
|||||||
protected
|
protected
|
||||||
function CreateSection: THeaderSection; virtual;
|
function CreateSection: THeaderSection; virtual;
|
||||||
function CreateSections: THeaderSections; virtual;
|
function CreateSections: THeaderSections; virtual;
|
||||||
|
procedure Loaded; override;
|
||||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||||
procedure SectionClick(Section: THeaderSection); virtual;
|
procedure SectionClick(Section: THeaderSection); virtual;
|
||||||
procedure SectionResize(Section: THeaderSection); virtual;
|
procedure SectionResize(Section: THeaderSection); virtual;
|
||||||
|
@ -74,6 +74,15 @@ begin
|
|||||||
Result := THeaderSections.Create(Self);
|
Result := THeaderSections.Create(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TCustomHeaderControl.Loaded;
|
||||||
|
begin
|
||||||
|
inherited Loaded;
|
||||||
|
FSavedCursor := Cursor;
|
||||||
|
//debugln('TCustomHeaderControl.Loaded: Setting FSavedCursor to ',DbgS(FSavedCursor));
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TCustomHeaderControl.Create(AOwner: TComponent);
|
constructor TCustomHeaderControl.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
@ -177,6 +186,8 @@ begin
|
|||||||
inherited MouseEnter;
|
inherited MouseEnter;
|
||||||
if not (csDesigning in ComponentState) then
|
if not (csDesigning in ComponentState) then
|
||||||
begin
|
begin
|
||||||
|
FSavedCursor := Cursor;
|
||||||
|
//debugln('TCustomHeaderControl.MouseEnter: setting FSavedCursor to ',dbgS(FSavedCursor));
|
||||||
FMouseInControl := True;
|
FMouseInControl := True;
|
||||||
UpdateState;
|
UpdateState;
|
||||||
end;
|
end;
|
||||||
@ -267,7 +278,7 @@ begin
|
|||||||
(GetSectionAt(Point(X - HeaderBorderSize, Y))<>GetSectionAt(Point(X + HeaderBorderSize, Y))) then
|
(GetSectionAt(Point(X - HeaderBorderSize, Y))<>GetSectionAt(Point(X + HeaderBorderSize, Y))) then
|
||||||
Cursor:=crSizeE
|
Cursor:=crSizeE
|
||||||
else
|
else
|
||||||
Cursor:=crDefault;
|
Cursor:=FSavedCursor;
|
||||||
UpdateState;
|
UpdateState;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user