Open noisecapella opened 12 years ago
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.