mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 07:21:38 +02:00
Qt: TQtWSCustomTabControl.SetPageIndex() simplified, added handleallocated check because LCL is setting visibleindex of page
git-svn-id: trunk@33957 -
This commit is contained in:
parent
7554ee973e
commit
8719c7e475
@ -233,11 +233,12 @@ begin
|
||||
Exit;
|
||||
TabWidget := TQtTabWidget(ATabControl.Handle);
|
||||
|
||||
if (AIndex < 0) or (AIndex > TabWidget.getCount - 1) then
|
||||
if (AIndex < 0) or (AIndex > ATabControl.PageCount - 1) then
|
||||
exit;
|
||||
|
||||
TabWidget.BeginUpdate;
|
||||
TabWidget.setCurrentWidget(TQtWidget(ATabControl.Page[AIndex].Handle));
|
||||
if ATabControl.Page[AIndex].HandleAllocated then
|
||||
TabWidget.setCurrentWidget(TQtWidget(ATabControl.Page[AIndex].Handle));
|
||||
TabWidget.EndUpdate;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user