From: <aki...@us...> - 2012-07-19 21:35:00
|
Revision: 9202 http://gridarta.svn.sourceforge.net/gridarta/?rev=9202&view=rev Author: akirschbaum Date: 2012-07-19 21:34:53 +0000 (Thu, 19 Jul 2012) Log Message: ----------- Show proper map paths in map window titles. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/mapview/DefaultMapView.java Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/DefaultMapView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/DefaultMapView.java 2012-07-19 21:28:47 UTC (rev 9201) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/DefaultMapView.java 2012-07-19 21:34:53 UTC (rev 9202) @@ -289,7 +289,14 @@ @NotNull private static String getWindowTitle(@NotNull final MapControl<?, ?, ?> mapControl, final int number, @NotNull final PathManager pathManager) { final File mapFile = mapControl.getMapModel().getMapFile(); - return (mapFile == null ? "<unsaved>" : pathManager.getMapPath(mapFile)) + " [ " + mapControl.getMapModel().getMapArchObject().getMapName() + " ] (" + number + ")" + (mapControl.getMapModel().isModified() ? " *" : ""); + final String mapPath; + if (mapFile == null) { + mapPath = "<unsaved>"; + } else { + final String tmp = pathManager.getMapPath2(mapFile); + mapPath = tmp == null ? mapFile.getPath() : tmp; + } + return mapPath + " [ " + mapControl.getMapModel().getMapArchObject().getMapName() + " ] (" + number + ")" + (mapControl.getMapModel().isModified() ? " *" : ""); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |