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 CollapsibleWidget scissors #357

Merged
merged 2 commits into from
Mar 13, 2021
Merged

Fix CollapsibleWidget scissors #357

merged 2 commits into from
Mar 13, 2021

Conversation

fgnm
Copy link
Contributor

@fgnm fgnm commented Mar 13, 2021

Hi,
I've noticed that when a CollapsibleWidget is placed in a scroll pane and it's partially visible scissors doesn't get applied because ScissorStack.pushScissors fails, this produce bugs like that:

collapsiblewidget-bug

Checking Y position before rendering should fix the problem, let me know.

Thanks!

@czyzby
Copy link
Collaborator

czyzby commented Mar 13, 2021

Checking Y position before rendering should fix the problem, let me know.

@fgnm Have you tested it locally in your application? Since you have a reproducible example, I'd appreciate it if you tested it in your environment. You can either install the snapshot version of VisUI and pull it from Maven Local in your project, or simply copy-paste the class and use your modified version just to verify the fix. Thanks.

@fgnm
Copy link
Contributor Author

fgnm commented Mar 13, 2021

Sure, I've already tested it before open this PR, also tried some different solutions, but this was the best I've found :)
That's how it works with the fix:
collapsiblewidget-fix

@czyzby
Copy link
Collaborator

czyzby commented Mar 13, 2021

OK, I misunderstood the original post.

The change seems harmless enough, but just to be sure - have you also checked if the widget is drawn properly outside of the scrollpane, and if the horizontal collapsible didn't break? Otherwise I think we can merge this as is. Thanks.

@czyzby czyzby self-requested a review March 13, 2021 17:36
@fgnm
Copy link
Contributor Author

fgnm commented Mar 13, 2021

I've checked the VisUI test application both with vertical and horizontal widget, no issue. I use CollapsibleWidget also in some other cases, no bug noticed too.

@czyzby czyzby merged commit 641a7dc into kotcrab:master Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants