[tiled] r684 - in branches/0.6: . src/tiled/core src/tiled/mapeditor src/tiled/mapeditor/actions
svn@biggeruniverse.com
svn at biggeruniverse.com
Sun Jun 25 07:33:42 PDT 2006
Author: bjorn
Date: 2006-06-25 09:33:41 -0500 (Sun, 25 Jun 2006)
New Revision: 684
Modified:
branches/0.6/CHANGES
branches/0.6/src/tiled/core/MapLayer.java
branches/0.6/src/tiled/mapeditor/MapEditor.java
branches/0.6/src/tiled/mapeditor/actions/SaveAsAction.java
Log:
Merged three fixes from trunk.
Modified: branches/0.6/CHANGES
===================================================================
--- branches/0.6/CHANGES 2006-06-25 14:17:37 UTC (rev 683)
+++ branches/0.6/CHANGES 2006-06-25 14:33:41 UTC (rev 684)
@@ -1,3 +1,9 @@
+0.6.1 - Unreleased
+
+* Fixed selection of TMX as default map format also when plugins are loaded
+* Fixed active marquee not being reset on loading a map
+* Fixed layer duplicates to not share layer properties with the original
+
0.6.0 - June 23rd, 2006
* Added internationalization, with translations to Dutch, German, Italian,
Modified: branches/0.6/src/tiled/core/MapLayer.java
===================================================================
--- branches/0.6/src/tiled/core/MapLayer.java 2006-06-25 14:17:37 UTC (rev 683)
+++ branches/0.6/src/tiled/core/MapLayer.java 2006-06-25 14:33:41 UTC (rev 684)
@@ -265,7 +265,7 @@
public abstract boolean isUsed(Tile t);
public abstract boolean isEmpty();
-
+
/**
* Creates a copy of this layer.
*
@@ -278,6 +278,7 @@
// Create a new bounds object
clone.bounds = new Rectangle(bounds);
+ clone.properties = (Properties) properties.clone();
return clone;
}
Modified: branches/0.6/src/tiled/mapeditor/MapEditor.java
===================================================================
--- branches/0.6/src/tiled/mapeditor/MapEditor.java 2006-06-25 14:17:37 UTC (rev 683)
+++ branches/0.6/src/tiled/mapeditor/MapEditor.java 2006-06-25 14:33:41 UTC (rev 684)
@@ -27,8 +27,6 @@
import javax.imageio.ImageIO;
import javax.swing.*;
-import javax.swing.border.CompoundBorder;
-import javax.swing.border.LineBorder;
import javax.swing.event.*;
import javax.swing.undo.UndoableEditSupport;
@@ -718,6 +716,7 @@
* Returns the current map.
*
* @return the currently selected map
+ * @see #setCurrentMap(Map)
*/
public Map getCurrentMap() {
return currentMap;
@@ -1748,7 +1747,7 @@
return true;
} else {
JOptionPane.showMessageDialog(appFrame,
- Resources.getString("general.file.failed"),
+ Resources.getString("general.file.failed"),
Resources.getString("dialog.openmap.error.title"),
JOptionPane.ERROR_MESSAGE);
}
@@ -1833,6 +1832,12 @@
}
public void setCurrentMap(Map newMap) {
+ // Cancel any active selection
+ if (marqueeSelection != null && currentMap != null) {
+ currentMap.removeLayerSpecial(marqueeSelection);
+ }
+ marqueeSelection = null;
+
currentMap = newMap;
boolean mapLoaded = currentMap != null;
@@ -1850,7 +1855,6 @@
tileCoordsLabel.setPreferredSize(null);
tileCoordsLabel.setText(" ");
zoomLabel.setText(" ");
- tilePaletteDialog.setMap(currentMap);
setCurrentTile(null);
} else {
final Preferences display = prefs.node("display");
@@ -1876,8 +1880,6 @@
coordinatesMenuItem.setState(
mapView.getMode(MapView.PF_COORDINATES));
- tilePaletteDialog.setMap(currentMap);
-
tileCoordsLabel.setText(String.valueOf(currentMap.getWidth() - 1)
+ ", " + (currentMap.getHeight() - 1));
tileCoordsLabel.setPreferredSize(null);
@@ -1888,7 +1890,8 @@
zoomLabel.setText(
String.valueOf((int) (mapView.getZoom() * 100)) + "%");
- //get the first non-null tile from the first tileset containing non-null tiles
+ // Get the first non-null tile from the first tileset containing
+ // non-null tiles.
Vector tilesets = currentMap.getTilesets();
Tile firstTile = null;
if (!tilesets.isEmpty()) {
Modified: branches/0.6/src/tiled/mapeditor/actions/SaveAsAction.java
===================================================================
--- branches/0.6/src/tiled/mapeditor/actions/SaveAsAction.java 2006-06-25 14:17:37 UTC (rev 683)
+++ branches/0.6/src/tiled/mapeditor/actions/SaveAsAction.java 2006-06-25 14:33:41 UTC (rev 684)
@@ -74,7 +74,6 @@
JFileChooser chooser = new ConfirmingFileChooser(startLocation);
chooser.addChoosableFileFilter(byExtensionFilter);
chooser.addChoosableFileFilter(tmxFilter);
- chooser.setFileFilter(byExtensionFilter);
MapWriter[] writers = editor.getPluginLoader().getWriters();
for (int i = 0; i < writers.length; i++) {
@@ -85,6 +84,8 @@
}
}
+ chooser.setFileFilter(byExtensionFilter);
+
int result = chooser.showSaveDialog(editor.getAppFrame());
if (result == JFileChooser.APPROVE_OPTION)
{
More information about the tiled-commit
mailing list