Commit a7bfcf6c authored by sekelsenmat's avatar sekelsenmat
Browse files

Removes TPageControl.OnPageChanged to fix bug #19903 double OnChange calls

git-svn-id: trunk@32622 -
parent 314b04c9
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment