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 for preview panel not showing in Ubuntu 11.04 with OpenJDK #257

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Fix for preview panel not showing in Ubuntu 11.04 with OpenJDK #257

wants to merge 7 commits into from

Conversation

noisecapella
Copy link

It's a little bit of a hack, but it should be simple enough to easily understand. The problem comes from a bug in OpenJDK/Java3D which seems to occur when there are two components in the JPanel at once (the gcode and model tabs). My fix is to replace the MainWindow.cardPanel JPanel object with a wrapper class, which ensures that the JPanel only contains one Component at a time. It stores the other hidden Components in its own HashMap, which is accessed when show() is called.

There are checks to make sure that this only happens when Base.isLinux() is true, otherwise it forwards method calls so that the behavior should be exactly what it was before. I did that mostly because I wasn't sure if it would produce any weird flickering or etc on other platforms.

@noisecapella
Copy link
Author

Is there any opinion one way or another about this fix? I'm willing to do a better fix if it's considered too hackish

@rheaplex
Copy link

rheaplex commented Apr 2, 2012

This works perfectly. It really should be merged into ReplicatorG so that the software just works on modern GNU/Linux systems.

@phooky
Copy link
Contributor

phooky commented Apr 2, 2012

I'll put this merge into the todo for the next repg release if it's not already there.

@rheaplex
Copy link

rheaplex commented Apr 2, 2012

Excellent! Thank you.

@noisecapella
Copy link
Author

FYI I just installed Ubuntu 12.04 and the broken behavior still happens in that version. Also, the only important commit is my first commit. The other ones are just merges to keep this updated with ReplicatorG/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants