From: Erik V. <ev...@us...> - 2010-02-08 21:24:09
|
Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27912/rails/ui/swing/hexmap Modified Files: GUIHex.java Log Message: Fixed buggy check on presence of tokens to prevent drawing the company home marker. This caused the disappearance of East Germany after laying the green Berlin tile in 1835, and also some spurious home marker drawings in other games. Index: GUIHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/GUIHex.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** GUIHex.java 31 Jan 2010 22:22:36 -0000 1.36 --- GUIHex.java 8 Feb 2010 21:24:01 -0000 1.37 *************** *** 332,343 **** // Only draw the company name if there isn't yet a token of that company ! if (city.getTokens() != null) { ! for (TokenI token : city.getTokens()) { ! if (token instanceof BaseToken ! && ((BaseToken)token).getCompany() == company) { ! continue homes; ! } ! } ! } p = getTokenCenter (1, 0, getHexModel().getCities().size(), city.getNumber()-1); --- 332,337 ---- // Only draw the company name if there isn't yet a token of that company ! if (model.hasTokenOfCompany(company)) continue homes; ! p = getTokenCenter (1, 0, getHexModel().getCities().size(), city.getNumber()-1); *************** *** 404,407 **** --- 398,402 ---- private void paintStationTokens(Graphics2D g2) { + if (getHexModel().getCities().size() > 1) { paintSplitStations(g2); |