From: Dan B. <dan...@us...> - 2008-10-30 01:52:16
|
Update of /cvsroot/jmri/jmri/jmrit/operations/trains In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8534/src/jmri/jmrit/operations/trains Modified Files: TrainEditFrame.java Log Message: Fix bug with add train Index: TrainEditFrame.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrit/operations/trains/TrainEditFrame.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TrainEditFrame.java 30 Oct 2008 00:07:46 -0000 1.9 --- TrainEditFrame.java 30 Oct 2008 01:52:05 -0000 1.10 *************** *** 228,232 **** } hourBox.setMinimumSize(new Dimension(100,25)); ! hourBox.setSelectedItem(_train.getDepartureTimeHour()); for (int i=0; i<60; i+=5){ --- 228,232 ---- } hourBox.setMinimumSize(new Dimension(100,25)); ! for (int i=0; i<60; i+=5){ *************** *** 236,240 **** minuteBox.addItem(Integer.toString(i)); } ! minuteBox.setSelectedItem(_train.getDepartureTimeMinute()); addItem(pdt, textDepartTime, 0, 5); addItem(pdt, hourBox, 1, 5); --- 236,243 ---- minuteBox.addItem(Integer.toString(i)); } ! if (train != null){ ! hourBox.setSelectedItem(train.getDepartureTimeHour()); ! minuteBox.setSelectedItem(train.getDepartureTimeMinute()); ! } addItem(pdt, textDepartTime, 0, 5); addItem(pdt, hourBox, 1, 5); |