LCL: TCustomTabControl: don't fire OnChanging when programatically changing TabIndex/PageIndex. Patch by Michl. Issue #0033720.

git-svn-id: trunk@59985 -
This commit is contained in:
bart 2019-01-04 11:20:10 +00:00
parent 3784a09e1b
commit 30e9e11e8c

View File

@ -581,7 +581,7 @@ begin
if (AValue < -1) or (AValue >= PageCount) then Exit;
//debugln('TCustomTabControl.SetPageIndex A ',dbgsName(Self),' AValue=',dbgs(AValue),' fPageIndex=',dbgs(fPageIndex),' PageCount=',dbgs(PageCount),' HandleAllocated=',dbgs(HandleAllocated),' ',dbgs(ComponentState));
if FPageIndex = AValue then exit;
if not CanChangePageIndex then exit;
if (nboDoChangeOnSetIndex in Options) and (not CanChangePageIndex) then exit; //Delphi does not call CanChange either
//debugln('TCustomTabControl.SetPageIndex B ',dbgsName(Self),' AValue=',dbgs(AValue),' fPageIndex=',dbgs(fPageIndex),' PageCount=',dbgs(PageCount),' HandleAllocated=',dbgs(HandleAllocated));
InternalSetPageIndex(AValue);