Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CONTAINER_PROJECT_SETTING_TAB_RIGHT option of EditorPlugin #98210

Merged

Conversation

allenwp
Copy link
Contributor

@allenwp allenwp commented Oct 15, 2024

This fixes incorrect behaviour when using the CONTAINER_PROJECT_SETTING_TAB_RIGHT option with EditorPlugin.add_control_to_container.

Example:

add_control_to_container(CONTAINER_PROJECT_SETTING_TAB_RIGHT, control)

Before this PR:
image

After this PR:
image

@allenwp allenwp requested a review from a team as a code owner October 15, 2024 19:38
@KoBeWi KoBeWi added this to the 4.4 milestone Oct 15, 2024
Copy link
Member

@timothyqiu timothyqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is actually a mistake in documentation. CONTAINER_PROJECT_SETTING_TAB_{LEFT,RIGHT} adds the tab relative to the "General" tab instead of relative to the entire list of tabs.

But the documented behavior is more intuitive and useful I think 👍

@KoBeWi
Copy link
Member

KoBeWi commented Oct 16, 2024

CONTAINER_PROJECT_SETTING_TAB_RIGHT adds the tab relative to the "General" tab instead of relative to the entire list of tabs.

No, it adds it relative to the leftmost tab. If you add a tab to the left, the right tab will be added after your tab and before General.

@timothyqiu
Copy link
Member

No, it adds it relative to the leftmost tab. If you add a tab to the left, the right tab will be added after your tab and before General.

Ah yeah, my interpretation of current behavior is wrong. My point is that the documentation was added three years after the implementation. So it's very likely the documentation is wrong.

@Repiteo Repiteo merged commit e64662c into godotengine:master Oct 16, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 16, 2024

Thanks!

@allenwp allenwp deleted the fix-CONTAINER_PROJECT_SETTING_TAB_RIGHT branch October 16, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants