openpixi/openpixi — pull request #48 by kstrel (2013-06-01 16:17:53+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.

Furthermore I have combined the enabling and disabling of collisions with the selection of the collision detection method into one dropdown menu.