fix:Panel2D works with only size provided, no borders#1168
Open
suchiii29 wants to merge 2 commits intofury-gl:v2from
Open
fix:Panel2D works with only size provided, no borders#1168suchiii29 wants to merge 2 commits intofury-gl:v2from
suchiii29 wants to merge 2 commits intofury-gl:v2from
Conversation
VanshAgarwal24036
left a comment
There was a problem hiding this comment.
Nice catch on the issue and fix.
One suggestion: it might be helpful to add a small regression test to verify that Panel2D works properly when has_border=False (e.g., adding actors, updating positions, and adding the panel to a scene).
Also, I noticed the PR removes the commented TabPanel2D class. Since this change is unrelated to the issue being fixed here, it might be better to restore that commented section in this PR.
Author
|
Thanks for the review! I've restored the commented TabPanel2D section. I'll add a regression test for the fix too, working on it now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! I was going through the issues and found that Panel2D crashes
when you create it with just the size and no border arguments.
The problem was that self.borders was never initialized when
has_border=False, so _get_actors() and _update_actors_position()
were failing trying to access it.
I fixed it by:
Tested it locally and it works fine now.
Fixes #1155