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

ScreenManager: Make clear_widgets correctly iterate over screens #6481

Merged
merged 2 commits into from
Aug 18, 2019

Conversation

inclement
Copy link
Member

Currently ScreenManager's clear_widgets iterates over self.screens while modifying it, so it misses entries doesn't actually remove everything. The fix is straightforward, this is just an oversight.

screens = self.screens
remove_widget = self.remove_widget
Copy link
Member

Choose a reason for hiding this comment

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

Just FYI, the reason for remove_widget = self.remove_widget is performance, but it probably doesn't really make a difference here either.

@inclement inclement merged commit 16d5376 into kivy:master Aug 18, 2019
@matham matham added this to the 2.0.0 milestone Oct 28, 2020
@matham matham changed the title Made ScreenManager clear_widgets correctly iterate over screens ScreenManager: Make clear_widgets correctly iterate over screens Dec 8, 2020
@matham matham added the Component: Widgets kivy/uix, style.kv label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Widgets kivy/uix, style.kv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants