From: <chr...@us...> - 2006-12-19 23:47:59
|
Revision: 1191 http://svn.sourceforge.net/gridarta/?rev=1191&view=rev Author: christianhujer Date: 2006-12-19 15:47:59 -0800 (Tue, 19 Dec 2006) Log Message: ----------- Fix for Mantis #0000541: Pickmaps on windows are not selectable Modified Paths: -------------- trunk/daimonin/src/daieditor/CPickmapPanel.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/src/app/net/sf/gridarta/map/AbstractMapArchObject.java trunk/src/app/net/sf/gridarta/map/MapArchObject.java Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-12-19 00:41:14 UTC (rev 1190) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-12-19 23:47:59 UTC (rev 1191) @@ -313,7 +313,9 @@ boolean foundMap = false; - final String newName = File.separator + tabpane.getTitleAt(tabpane.getSelectedIndex()); + // Fix for Mantis #0000541: pickmap selection doesn't work on windows + // This has to be a '/' always, even on Windows, because the pickmap filename is a URI. + final String newName = '/' + tabpane.getTitleAt(tabpane.getSelectedIndex()); for (MapControl tmp : pickmaps) { if (tmp != null && tmp.getMapFileName().endsWith(newName)) { Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2006-12-19 00:41:14 UTC (rev 1190) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2006-12-19 23:47:59 UTC (rev 1191) @@ -283,6 +283,7 @@ return mapModel.isCutoffSafe(size); } + // TODO: Rename because the filename is a URI now. public String getMapFileName() { return mapArch.getFileName(); } Modified: trunk/src/app/net/sf/gridarta/map/AbstractMapArchObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/AbstractMapArchObject.java 2006-12-19 00:41:14 UTC (rev 1190) +++ trunk/src/app/net/sf/gridarta/map/AbstractMapArchObject.java 2006-12-19 23:47:59 UTC (rev 1191) @@ -16,6 +16,7 @@ @NotNull private String mapName = "<unnamed>"; /** The filename of this map. */ + // TODO: Rename because the filename is a URI now. @NotNull private String fileName = "<new map>"; /** The x coordinate for entering the map. */ @@ -76,6 +77,7 @@ } /** {@inheritDoc} */ + // TODO: Rename because the filename is a URI now. @NotNull public final String getFileName() { return fileName; } Modified: trunk/src/app/net/sf/gridarta/map/MapArchObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/MapArchObject.java 2006-12-19 00:41:14 UTC (rev 1190) +++ trunk/src/app/net/sf/gridarta/map/MapArchObject.java 2006-12-19 23:47:59 UTC (rev 1191) @@ -58,6 +58,7 @@ * @deprecated the filename isn't really an attribute of the MapArchObject. Only use MapControl for this. * @todo if this remains here, think whether the fileName is really not null or whether a nullable filename makes more sense. */ + // TODO: Rename because the filename is a URI now. @Deprecated @NotNull String getFileName(); /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |