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

View File

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

View File

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

View File

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

View File

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