From: Erik V. <ev...@us...> - 2009-12-07 17:48:44
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv32278/rails/ui/swing Modified Files: ORWindow.java Log Message: Added round type check to updateStatus(), to prevent errors on map updates outside OR (such as token exchanges) Index: ORWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORWindow.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ORWindow.java 27 Nov 2009 20:31:50 -0000 1.28 --- ORWindow.java 7 Dec 2009 17:48:32 -0000 1.29 *************** *** 155,159 **** String numORs = gameManager.getNumOfORs (); ! /*if (!or.wasInterrupted())*/ orPanel.recreate(or); setTitle(LocalText.getText("MapWindowORTitle", gameManager.getORId(), --- 155,159 ---- String numORs = gameManager.getNumOfORs (); ! orPanel.recreate(or); setTitle(LocalText.getText("MapWindowORTitle", gameManager.getORId(), *************** *** 171,174 **** --- 171,178 ---- public void updateStatus() { + // Safety check. Do nothing if this method is called outside Operating Rounds, + // for instance when a token is exchanged during a Stock Round. + if (!(gameUIManager.getCurrentRound() instanceof OperatingRound)) return; + orUIManager.updateStatus(); requestFocus(); |