Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,084
    • Issues 2,084
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #21728
Closed
Open
Created Apr 13, 2012 by FPC Admin account@fpc_adminOwner

Wrong variable set in TCarbonTabsControl.SetPageIndex

Original Reporter info from Mantis: djenkins @dfjenkins
  • Reporter name: David Jenkins

Description:

This looks like a bug in TCarbonTabsControl (the setting ATabIndex := -1).

    if (ATabIndex < 0) or (ATabIndex >= FTabs.Count) then
    begin
      // this PageIndex does not exist. This should only happen if AIndex<0
      {if AIndex>=0 then
      begin
        Debugln(['TCarbonTabsControl.SetPageIndex unknown pageindex: ',AIndex]);
      end;}
      ATabIndex := -1;
      SetControl32BitValue(ControlRef(Widget), 0);
      ShowTab;
      Exit;
    end;

    FTabIndex := ATabIndex;

I don't see any need to set ATabIndex but setting FTabIndex does make sense as it will clear the pages.

Patch against rev 36681 attached

Mantis conversion info:

  • Mantis ID: 21728
  • Fixed in revision: 36958 (#8c6daf0f)
  • Monitored by: » @dfjenkins (David Jenkins)
Assignee
Assign to
Time tracking