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 Toggle Last Opened Bottom Panel not working after restoring FileSystem Dock to the side #94053

Conversation

Hilderin
Copy link
Contributor

@Hilderin Hilderin commented Jul 7, 2024

Modifications:

  • When the moved panel is visible, the first panel is now opened.
  • When the bottom panel is closed when the panel is moved (ex: via plugin EditorPlugin::remove_control_from_bottom_panel), the bottom panel is kept closed and last_opened_control is updated for the first panel.

@Hilderin Hilderin requested review from a team as code owners July 7, 2024 21:55
@AThousandShips AThousandShips added this to the 4.4 milestone Jul 8, 2024
if (was_visible) {
// Open the first panel to ensure that if the removed dock was visible, the bottom
// panel will not collapse.
_switch_to_item(true, 0);
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if it's better to close the panel instead 🤔
I don't see why would you want to open Output in this case.

Copy link
Member

@Calinou Calinou Jul 10, 2024

Choose a reason for hiding this comment

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

I'm 50/50 on this one personally. I'd say we should keep this PR's behavior as-is and change it if there's significant justified pushback.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tend to agree with @Calinou, this behavior prevent the closing of the bottom panel when it's already opened. But it's really a personal taste at this point.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected.

@akien-mga akien-mga modified the milestones: 4.4, 4.3 Jul 17, 2024
@akien-mga akien-mga merged commit efae318 into godotengine:master Jul 17, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

Toggle Last Opened Bottom Panel not working after restoring FileSystem Dock to the side
5 participants