From: Erik V. <ev...@us...> - 2009-09-01 19:30:24
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27720/rails/ui/swing Modified Files: ORPanel.java Log Message: Fix loans display in OR panel Index: ORPanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORPanel.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ORPanel.java 28 Aug 2009 20:27:38 -0000 1.30 --- ORPanel.java 1 Sep 2009 19:30:15 -0000 1.31 *************** *** 118,122 **** private PublicCompanyI orComp = null; ! private List<JMenuItem> menuItemsToReset = new ArrayList<JMenuItem>(); --- 118,122 ---- private PublicCompanyI orComp = null; ! private List<JMenuItem> menuItemsToReset = new ArrayList<JMenuItem>(); *************** *** 418,422 **** if (hasCompanyLoans) { ! if (c.canLoan()) { f = compLoans[i] = new Field (c.getLoanValueModel()); } else { --- 418,423 ---- if (hasCompanyLoans) { ! //if (c.canLoan()) { ! if (c.getLoanValueModel() != null) { f = compLoans[i] = new Field (c.getLoanValueModel()); } else { *************** *** 558,562 **** president[i].setHighlight(false); } ! for (JMenuItem item : menuItemsToReset) { item.setEnabled(false); --- 559,563 ---- president[i].setHighlight(false); } ! for (JMenuItem item : menuItemsToReset) { item.setEnabled(false); *************** *** 723,737 **** if (action != null) redoButton.setPossibleAction(action); } ! public void enableLoanTaking (TakeLoans action) { if (action != null) takeLoans.addPossibleAction(action); takeLoans.setEnabled(action != null); } ! public void enableLoanRepayment (RepayLoans action) { ! repayLoans.setPossibleAction(action); repayLoans.setEnabled(true); ! loansCaption.setHighlight(true); --- 724,738 ---- if (action != null) redoButton.setPossibleAction(action); } ! public void enableLoanTaking (TakeLoans action) { if (action != null) takeLoans.addPossibleAction(action); takeLoans.setEnabled(action != null); } ! public void enableLoanRepayment (RepayLoans action) { ! repayLoans.setPossibleAction(action); repayLoans.setEnabled(true); ! loansCaption.setHighlight(true); |