openpixi/openpixi — pull request #47 by kstrel (2013-05-30 18:09:51+00:00)
Title: Fixed GUI s.t. it doesnt enable collision detection during initialization

Previously we had a boolean variable in the Simulation class that enabled and disabled collision detection (even though we actually have empty detector classes for that). That also meant that setting a non-empy detector algorithm in the Settings class (for the non-gui version for example) wouldnt actually enable collisions. The boolean in the Simulation class would have had to be changed too.

The boolean was a workaround because without it the GUI always enabled collision detection during initialization. I have fixed it now. The problem was that detectorChange() and algorithmCollisionChange() from Particle2DPanel were called during initialization and these two methods could only set non-empty detector classes.