From: Erik V. <eri...@xs...> - 2012-03-18 15:23:26
|
Martin, What exactly was the problem that you encountered? Do you have a saved file that shows it? Your change isn’t incorrect, but IMO it should be superfluous, as hex.getPictureID() should already handle all valid cases (although in a different way). If you really saw a problem, there must be another underlying bug. I’m assuming that the tile/pic configurations are correct (all preprinted ones negative, all laid ones positive). This may need further checking, though. Erik. From: Dr....@t-... [mailto:Dr....@t-...] Sent: Sunday, March 18, 2012 10:05 AM To: Rails Development; Erik Vos Subject: Fix for MapHex Display Problem Hi, please find enclosed the patch for the small problem created with the introduction of tilebased pictureIDs. Autor: Martin Brumm <Dr....@t-...> 2012-03-18 10:01:39 Eintragender: Martin Brumm <Dr....@t-...> 2012-03-18 10:01:39 Eltern: a384f297999ccc2de0d66a1c9d836b37d6e45dd8 (Fixed the startprice but didnt remove the pop up for IG/BCR) Zweig: master Folgt auf: v1.5.0 Vorgänger von: Fixed new pictureID Display. Tiles with a positive Picture ID have preference over hex.PictureIDs. ---------------------- rails/ui/swing/hexmap/GUITile.java ---------------------- index f7162f9..5ccf092 100644 @@ -53,7 +53,12 @@ public class GUITile { this.hex = (MapHex)guiHex.getModel(); TileManager tileManager = guiHex.getHexMap().orUIManager.getTileManager(); tile = tileManager.getTile(tileId); - picId = hex.getPictureId(); + + if (tile.getPictureId() >0 ) { + picId= tile.getPictureId(); + } else { + picId = hex.getPictureId(); + } if (hex.getTileOrientation() == TileOrientation.EW) { baseRotation = 0.5 * DEG60; |