mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 07:59:28 +02:00
Removes TPageControl.OnPageChanged to fix bug #19903 double OnChange calls
git-svn-id: trunk@32622 -
This commit is contained in:
parent
314b04c9a1
commit
a7bfcf6c9b
@ -244,7 +244,7 @@ begin
|
|||||||
ClearButtons;
|
ClearButtons;
|
||||||
FPageControl:=AValue;
|
FPageControl:=AValue;
|
||||||
if FPageControl<>nil then begin
|
if FPageControl<>nil then begin
|
||||||
FPageControl.OnPageChanged:=@ActivePageChanged;
|
FPageControl.OnChange:=@ActivePageChanged;
|
||||||
end;
|
end;
|
||||||
UpdateNoteBookButtons;
|
UpdateNoteBookButtons;
|
||||||
end;
|
end;
|
||||||
|
@ -5133,7 +5133,7 @@ Begin
|
|||||||
else
|
else
|
||||||
Options:=Options-[nboShowCloseButtons];
|
Options:=Options-[nboShowCloseButtons];
|
||||||
TabPosition := EditorOpts.TabPosition;
|
TabPosition := EditorOpts.TabPosition;
|
||||||
OnPageChanged := @NotebookPageChanged;
|
OnChange := @NotebookPageChanged;
|
||||||
OnCloseTabClicked := @CloseTabClicked;
|
OnCloseTabClicked := @CloseTabClicked;
|
||||||
OnMouseDown:=@NotebookMouseDown;
|
OnMouseDown:=@NotebookMouseDown;
|
||||||
TabDragMode := dmAutomatic;
|
TabDragMode := dmAutomatic;
|
||||||
|
@ -423,7 +423,6 @@ type
|
|||||||
write FOnCloseTabClicked;
|
write FOnCloseTabClicked;
|
||||||
property OnGetImageIndex: TTabGetImageEvent read FOnGetImageIndex
|
property OnGetImageIndex: TTabGetImageEvent read FOnGetImageIndex
|
||||||
write FOnGetImageIndex;
|
write FOnGetImageIndex;
|
||||||
property OnPageChanged: TNotifyEvent read FOnPageChanged write FOnPageChanged;
|
|
||||||
property Options: TNoteBookOptions read FOptions write SetOptions default [];
|
property Options: TNoteBookOptions read FOptions write SetOptions default [];
|
||||||
property Page[Index: Integer]: TCustomPage read GetPage;
|
property Page[Index: Integer]: TCustomPage read GetPage;
|
||||||
property PageCount: integer read GetPageCount;
|
property PageCount: integer read GetPageCount;
|
||||||
@ -575,7 +574,6 @@ type
|
|||||||
property OnMouseLeave;
|
property OnMouseLeave;
|
||||||
property OnMouseMove;
|
property OnMouseMove;
|
||||||
property OnMouseUp;
|
property OnMouseUp;
|
||||||
property OnPageChanged;
|
|
||||||
property OnResize;
|
property OnResize;
|
||||||
property OnStartDock;
|
property OnStartDock;
|
||||||
property OnStartDrag;
|
property OnStartDrag;
|
||||||
|
@ -278,8 +278,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomTabControl.DoChange;
|
procedure TCustomTabControl.DoChange;
|
||||||
begin
|
begin
|
||||||
if Assigned(OnPageChanged) then
|
if Assigned(OnChange) then
|
||||||
OnPageChanged(Self);
|
OnChange(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -237,7 +237,7 @@ begin
|
|||||||
FNoteBook.Parent := TabControl;
|
FNoteBook.Parent := TabControl;
|
||||||
FNoteBook.OnGetImageIndex := @NBGetImageIndex;
|
FNoteBook.OnGetImageIndex := @NBGetImageIndex;
|
||||||
FNoteBook.OnChanging := @NBChanging;
|
FNoteBook.OnChanging := @NBChanging;
|
||||||
FNoteBook.OnPageChanged := @NBPageChanged;
|
FNoteBook.OnChange := @NBPageChanged;
|
||||||
TabControlBoundsChange;
|
TabControlBoundsChange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user