From: Stefan F. <ste...@us...> - 2012-10-02 09:14:31
|
rails/game/OperatingRound.java | 4 ++-- rails/ui/swing/GameStatus.java | 4 +++- rails/ui/swing/ReportWindowDynamic.java | 28 ++++++++++++++++------------ readme.txt | 8 ++++---- version.number | 2 +- 5 files changed, 26 insertions(+), 20 deletions(-) New commits: commit 1b235aa8d988b7253906a8c89a5b36edf36951ed Author: Stefan Frey <ste...@we...> Date: Thu Sep 27 15:33:15 2012 +0200 fixed bug in 1889: the free tile lay of private C is not offered if cash was not sufficient to pay potential cost diff --git a/rails/game/OperatingRound.java b/rails/game/OperatingRound.java index d799ad9..af6df5e 100644 --- a/rails/game/OperatingRound.java +++ b/rails/game/OperatingRound.java @@ -1771,8 +1771,8 @@ public class OperatingRound extends Round implements Observer { for (String colour : layableColours) { if (hexes != null) { for (MapHex hex : hexes) { - // Check if the company can pay any costs - if (cash < hex.getTileCost()) continue; + // Check if the company can pay any costs (if not free) + if (!stl.isFree() && cash < hex.getTileCost()) continue; // At least one hex does not have that colour yet if (hex.getCurrentTile().getColourNumber() + 1 commit ef4e13ac6c9dba970ff8e7720098eaf7d0d9a552 Author: Stefan Frey <ste...@we...> Date: Fri Sep 21 12:20:16 2012 +0200 prepared for release 1.7.10 diff --git a/readme.txt b/readme.txt index ba355d5..5ef8bbc 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -Rails release 1.7.9: +Rails release 1.7.10: A new maintenance release for Rails 1.x series @@ -6,8 +6,8 @@ This release fixes two bugs. Contributors: Stefan Frey -Bugs reported by Arne Ãsterlund +Bugs reported by theos and Russel J. Alphey Lists of bugs fixed: -- List of recent files does not work with few entries -- 1830 Coalfields (and others): Obsolete Trains in Pool should rust (previously the stayed forever) +- fixed bug in starting a company in 18EU if only one start price is possible +- fixed bug that the ReportWindow does not scroll down at game start \ No newline at end of file diff --git a/version.number b/version.number index 385bed2..2ab2e9d 100644 --- a/version.number +++ b/version.number @@ -1,5 +1,5 @@ #Property file that contains version number and the develop indicator -version=1.7.9 +version=1.7.10 # the following string "@DEVELOP@ is replaced by an empty string in the release version # this is done automatically by ant develop=@DEVELOP@ \ No newline at end of file commit 31879bbddbab1a44403379a4ab34004c3c903d53 Author: Stefan Frey <ste...@we...> Date: Fri Sep 21 10:45:27 2012 +0200 fixed bug that the ReportWindow does not scrolldown at gameStart, added invokeLater to scrollDown to run in EDT, reported by Russel J. Alphey diff --git a/rails/ui/swing/ReportWindowDynamic.java b/rails/ui/swing/ReportWindowDynamic.java index df789f8..83bf69f 100644 --- a/rails/ui/swing/ReportWindowDynamic.java +++ b/rails/ui/swing/ReportWindowDynamic.java @@ -181,21 +181,25 @@ public class ReportWindowDynamic extends AbstractReportWindow implements Action @Override public void scrollDown() { // only set caret if visible - if (!this.isVisible()) return; + //if (!this.isVisible()) return; // find the active message in the parsed html code (not identical to the position in the html string) // thus the message indicator is used - int caretPosition; - try{ - String docText = editorPane.getDocument().getText(0, editorPane.getDocument().getLength()); - caretPosition = docText.indexOf(ReportBuffer.ACTIVE_MESSAGE_INDICATOR); - } catch (BadLocationException e){ - caretPosition = -1; - }; - final int caretPositionStore = caretPosition; - if (caretPosition != -1) { - editorPane.setCaretPosition(caretPositionStore); - } + SwingUtilities.invokeLater(new Runnable() { + public void run() { + int caretPosition; + try{ + String docText = editorPane.getDocument().getText(0, editorPane.getDocument().getLength()); + caretPosition = docText.indexOf(ReportBuffer.ACTIVE_MESSAGE_INDICATOR); + } catch (BadLocationException e){ + caretPosition = -1; + }; + final int caretPositionStore = caretPosition; + if (caretPosition != -1) { + editorPane.setCaretPosition(caretPositionStore); + } + } + }); } public void actionPerformed(ActionEvent e) { commit 4c1d24f937619baccda7e76d141a621319282d3d Author: Stefan Frey <ste...@we...> Date: Fri Sep 21 10:35:49 2012 +0200 fixed bug in starting a company in 18EU if only one start price is possible, bug reported by theos diff --git a/rails/ui/swing/GameStatus.java b/rails/ui/swing/GameStatus.java index 498522a..d3bad8b 100644 --- a/rails/ui/swing/GameStatus.java +++ b/rails/ui/swing/GameStatus.java @@ -14,6 +14,7 @@ import rails.common.LocalText; import rails.game.*; import rails.game.action.*; import rails.game.correct.CashCorrectionAction; +import rails.game.specific._18EU.StartCompany_18EU; import rails.sound.SoundManager; import rails.ui.swing.elements.*; import rails.ui.swing.hexmap.HexHighlightMouseListener; @@ -765,7 +766,8 @@ public class GameStatus extends GridPanel implements ActionListener { } } int index = 0; - if (options.size() > 1) { + // check for instanceof StartCompany_18EU allows to continue with selecting the minor + if (options.size() > 1 || actions.get(0) instanceof StartCompany_18EU) { if (startCompany) { RadioButtonDialog dialog = new RadioButtonDialog ( GameUIManager.COMPANY_START_PRICE_DIALOG, |