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

git-svn-id: trunk@32622 -
This commit is contained in:
sekelsenmat 2011-10-02 18:03:18 +00:00
parent 314b04c9a1
commit a7bfcf6c9b
5 changed files with 5 additions and 7 deletions

View File

@ -244,7 +244,7 @@ begin
ClearButtons;
FPageControl:=AValue;
if FPageControl<>nil then begin
FPageControl.OnPageChanged:=@ActivePageChanged;
FPageControl.OnChange:=@ActivePageChanged;
end;
UpdateNoteBookButtons;
end;

View File

@ -5133,7 +5133,7 @@ Begin
else
Options:=Options-[nboShowCloseButtons];
TabPosition := EditorOpts.TabPosition;
OnPageChanged := @NotebookPageChanged;
OnChange := @NotebookPageChanged;
OnCloseTabClicked := @CloseTabClicked;
OnMouseDown:=@NotebookMouseDown;
TabDragMode := dmAutomatic;

View File

@ -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;

View File

@ -278,8 +278,8 @@ end;
procedure TCustomTabControl.DoChange;
begin
if Assigned(OnPageChanged) then
OnPageChanged(Self);
if Assigned(OnChange) then
OnChange(Self);
end;
{------------------------------------------------------------------------------

View File

@ -237,7 +237,7 @@ begin
FNoteBook.Parent := TabControl;
FNoteBook.OnGetImageIndex := @NBGetImageIndex;
FNoteBook.OnChanging := @NBChanging;
FNoteBook.OnPageChanged := @NBPageChanged;
FNoteBook.OnChange := @NBPageChanged;
TabControlBoundsChange;
end;