Skip to content

feat : add "Default tab" property on tab widget - #3923

Open
gabriel-desmarchelier wants to merge 1 commit into
ControlSystemStudio:masterfrom
gabriel-desmarchelier:feat-default-tab-prop
Open

gabriel-desmarchelier wants to merge 1 commit into
ControlSystemStudio:masterfrom
gabriel-desmarchelier:feat-default-tab-prop

Conversation

@gabriel-desmarchelier

@gabriel-desmarchelier gabriel-desmarchelier commented Sep 15, 2026

Copy link
Copy Markdown

In my opinion, the Tab widget Active Tab property behaviour is quite annoying :

  • it is used as the default tab to be opened when running the display
  • in edition mode, its value changes when browsing through the different tabs. One has to think every time about clicking back on the tab they want to be the default before saving

In the end, the saved Active Tab is often the one in which the latest edit was made, rather than the one we actually want to be the default.

I suggest a dedicated Default Tab property :

  • the Active Tab property remains, though it's now mostly to be used at runtime (e.g. in rules) or for backward compatibility
  • to ensure backward compatibility, the Default Tab default value is set to -1 : in this case, we keep using the Active Tab property to set the default tab

I come up with this proposal as a fix for a behavior we dislike, but there may be other ideas to think about :

  • maybe just keep a single Active Tab property but delete the behaviour of it changing in edition mode

Note that the same could be implemented for NavigationTabs, if my proposal gets any support.

Here is bob file to test this feature :
active_and_default_tab.tar.gz

Checklist

  • Testing:

    • The feature has automated tests
    • Tests were run
    • If not, explain how you tested your changes
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant