From: kruland2607 Date: Mon, 4 Jun 2012 19:02:56 +0000 (+0000) Subject: Make separate method for notifySimsChanged since this is useful without creating... X-Git-Tag: upstream/12.09^2~208 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=27e78dc87635b5fed91cce13e76398de522c8848;p=debian%2Fopenrocket Make separate method for notifySimsChanged since this is useful without creating or deleting a simulation (for example when a simulation is done executing). git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@747 180e2498-e6e9-4542-8430-84ac67f01cd8 --- diff --git a/android/src/net/sf/openrocket/android/CurrentRocket.java b/android/src/net/sf/openrocket/android/CurrentRocket.java index 887a54a1..1539b10f 100644 --- a/android/src/net/sf/openrocket/android/CurrentRocket.java +++ b/android/src/net/sf/openrocket/android/CurrentRocket.java @@ -30,21 +30,23 @@ public class CurrentRocket { return rocketDocument; } + public void notifySimsChanged() { + if ( handler != null ) { + handler.simsChangedMessage(); + } + } + public void addNewSimulation() { Rocket rocket = rocketDocument.getRocket(); Simulation newSim = new Simulation(rocket); newSim.setName(rocketDocument.getNextSimulationName()); rocketDocument.addSimulation(newSim); - if ( handler != null ) { - handler.simsChangedMessage(); - } + notifySimsChanged(); } public void deleteSimulation( int simulationPos ) { rocketDocument.removeSimulation( simulationPos ); - if ( handler != null ) { - handler.simsChangedMessage(); - } + notifySimsChanged(); } public String addNewMotorConfig() {