Skip to content

Fix become bug #614

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

Merged
merged 10 commits into from
Oct 27, 2020
Merged

Fix become bug #614

merged 10 commits into from
Oct 27, 2020

Conversation

eulertour
Copy link
Member

Fixes #610 by using the old logic to separate static and non-static mobjects.

@huguesdevimeux
Copy link
Member

Do you think you could add a test for this?

@eulertour
Copy link
Member Author

To be honest I don't know how to add new tests. Is the process documented somewhere?

@huguesdevimeux
Copy link
Member

@behackl behackl added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Oct 25, 2020
@behackl behackl added this to the Release v0.1.1 milestone Oct 25, 2020
@behackl
Copy link
Member

behackl commented Oct 25, 2020

I am okay with reverting to the old logic, and adding a test for Mobject.become is certainly a good idea.

Just out of curiosity: is the problem with the new logic "just" that the background is not repainted after changing the Mobject with .become? Or is something else happening too?

@behackl behackl self-requested a review October 25, 2020 13:19
@eulertour
Copy link
Member Author

There's some problem with the logic for determining which mobjects are moving which considers the mobject to still be static after calling become(), so it gets painted to the screen.

@eulertour
Copy link
Member Author

The tests are passing locally, so I'm not sure what's going on here.

@eulertour
Copy link
Member Author

When I checkout either 653502a or bd9c5c9 and run the tests locally they pass. I think the config changes in the merge in 653502a may have broken the ability to add tests. In any case we shouldn't debug the problem in the PR (unless it's something simple I'm just missing).

@eulertour eulertour mentioned this pull request Oct 26, 2020
@behackl
Copy link
Member

behackl commented Oct 26, 2020

Ah, that's a tricky one. I believe the problem is actually with the test itself: you add Text without specifying the font, so it uses some default font. These might differ between systems:

image
(The left side is rendered locally, the right is the image saved as numpy data.)

I don't know whether we can actually choose a font that is guaranteed to exist on all operating systems; but we could try using something really wide-spread like Arial or Times New Roman. (AFAIK, they are commonly not installed on mobile devices, but I think that we don't necessarily have to care for running the test suite on such a setup. For now. :-))

@eulertour eulertour merged commit 076a39c into ManimCommunity:master Oct 27, 2020
@eulertour eulertour deleted the tex-bug-2 branch March 4, 2021 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:bugfix Bug fix for use in PRs solving a specific issue:bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follow-up to #562 -- bug with Transform / Mobject.become
4 participants