-
Notifications
You must be signed in to change notification settings - Fork 226
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
base: master
Are you sure you want to change the base?
Conversation
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 |
This works perfectly. It really should be merged into ReplicatorG so that the software just works on modern GNU/Linux systems. |
I'll put this merge into the todo for the next repg release if it's not already there. |
Excellent! Thank you. |
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 |
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.