mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 04:19:19 +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;
|
||||
FPageControl:=AValue;
|
||||
if FPageControl<>nil then begin
|
||||
FPageControl.OnPageChanged:=@ActivePageChanged;
|
||||
FPageControl.OnChange:=@ActivePageChanged;
|
||||
end;
|
||||
UpdateNoteBookButtons;
|
||||
end;
|
||||
|
@ -5133,7 +5133,7 @@ Begin
|
||||
else
|
||||
Options:=Options-[nboShowCloseButtons];
|
||||
TabPosition := EditorOpts.TabPosition;
|
||||
OnPageChanged := @NotebookPageChanged;
|
||||
OnChange := @NotebookPageChanged;
|
||||
OnCloseTabClicked := @CloseTabClicked;
|
||||
OnMouseDown:=@NotebookMouseDown;
|
||||
TabDragMode := dmAutomatic;
|
||||
|
@ -423,7 +423,6 @@ type
|
||||
write FOnCloseTabClicked;
|
||||
property OnGetImageIndex: TTabGetImageEvent read FOnGetImageIndex
|
||||
write FOnGetImageIndex;
|
||||
property OnPageChanged: TNotifyEvent read FOnPageChanged write FOnPageChanged;
|
||||
property Options: TNoteBookOptions read FOptions write SetOptions default [];
|
||||
property Page[Index: Integer]: TCustomPage read GetPage;
|
||||
property PageCount: integer read GetPageCount;
|
||||
@ -575,7 +574,6 @@ type
|
||||
property OnMouseLeave;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
property OnPageChanged;
|
||||
property OnResize;
|
||||
property OnStartDock;
|
||||
property OnStartDrag;
|
||||
|
@ -278,8 +278,8 @@ end;
|
||||
|
||||
procedure TCustomTabControl.DoChange;
|
||||
begin
|
||||
if Assigned(OnPageChanged) then
|
||||
OnPageChanged(Self);
|
||||
if Assigned(OnChange) then
|
||||
OnChange(Self);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -237,7 +237,7 @@ begin
|
||||
FNoteBook.Parent := TabControl;
|
||||
FNoteBook.OnGetImageIndex := @NBGetImageIndex;
|
||||
FNoteBook.OnChanging := @NBChanging;
|
||||
FNoteBook.OnPageChanged := @NBPageChanged;
|
||||
FNoteBook.OnChange := @NBPageChanged;
|
||||
TabControlBoundsChange;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user