Skip to content

Commit

Permalink
Merge branch '1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn committed Aug 28, 2017
2 parents 60d72e5 + 7755370 commit 53a96e6
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 13 deletions.
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### 1.0.3 (29 August 2017)

* Fixed crash on reload map (#1659, #1694)
* Fixed possible crash on undo/redo in collision editor (#1695)
* Fixed tile replacement to add tileset when needed (by Mohamed Thabet, #1641)
* Fixed the display of the image source property for tilesets
* Fixed shortcut for 'Copy tile coordinates' (Alt+C) in Portuguese translation (by olueiro)
* JSON plugin: Fixed reading of tileset column count
* JSON plugin: Fixed reading of custom properties on tile collision object group

### 1.0.2 (27 June 2017)

* Added read-only tile and terrain properties in map editor (#1615)
Expand Down
8 changes: 6 additions & 2 deletions src/libtiled/varianttomapconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,12 @@ SharedTileset VariantToMapConverter::toTileset(const QVariant &variant)
}

QVariantMap objectGroupVariant = tileVar[QLatin1String("objectgroup")].toMap();
if (!objectGroupVariant.isEmpty())
tile->setObjectGroup(toObjectGroup(objectGroupVariant));
if (!objectGroupVariant.isEmpty()) {
ObjectGroup *objectGroup = toObjectGroup(objectGroupVariant);
if (objectGroup)
objectGroup->setProperties(extractProperties(objectGroupVariant));
tile->setObjectGroup(objectGroup);
}

QVariantList frameList = tileVar[QLatin1String("animation")].toList();
if (!frameList.isEmpty()) {
Expand Down
6 changes: 3 additions & 3 deletions src/tiled/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>Tiled</string>
<key>CFBundleGetInfoString</key>
<string>Tiled 1.0.2, Copyright 2008-2017 Thorbjørn Lindeijer, GNU General Public License</string>
<string>Tiled 1.0.3, Copyright 2008-2017 Thorbjørn Lindeijer, GNU General Public License</string>
<key>CFBundleIconFile</key>
<string>tiled-icon-mac</string>
<key>CFBundleIdentifier</key>
Expand All @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.0.3</string>
<key>CFBundleVersion</key>
<string>1.0.2</string>
<string>1.0.3</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
Expand Down
6 changes: 3 additions & 3 deletions src/tiled/documentmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ bool DocumentManager::reloadDocumentAt(int index)
if (auto mapDocument = qobject_cast<MapDocument*>(oldDocument)) {
// TODO: Consider fixing the reload to avoid recreating the MapDocument
auto newDocument = MapDocument::load(oldDocument->fileName(),
mapDocument->readerFormat(),
&error);
mapDocument->readerFormat(),
&error);
if (!newDocument) {
emit reloadError(tr("%1:\n\n%2").arg(oldDocument->fileName(), error));
return false;
Expand All @@ -586,7 +586,7 @@ bool DocumentManager::reloadDocumentAt(int index)
closeDocumentAt(index);
mTabBar->moveTab(mDocuments.size() - 1, index);

checkTilesetColumns(mapDocument);
checkTilesetColumns(newDocument);

} else if (auto tilesetDocument = qobject_cast<TilesetDocument*>(oldDocument)) {
if (tilesetDocument->isEmbedded()) {
Expand Down
9 changes: 6 additions & 3 deletions src/tiled/mapdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,6 @@ static void collectObjects(Layer *layer, QList<MapObject*> &objects)
void MapDocument::onLayerAboutToBeRemoved(GroupLayer *groupLayer, int index)
{
Layer *layer = groupLayer ? groupLayer->layerAt(index) : mMap->layerAt(index);
if (layer == mCurrentObject)
setCurrentObject(nullptr);

// Deselect any objects on this layer when necessary
if (layer->isObjectGroup() || layer->isGroupLayer()) {
Expand All @@ -926,8 +924,13 @@ void MapDocument::onLayerAboutToBeRemoved(GroupLayer *groupLayer, int index)

void MapDocument::onLayerRemoved(Layer *layer)
{
if (mCurrentLayer && mCurrentLayer->isParentOrSelf(layer))
if (mCurrentLayer && mCurrentLayer->isParentOrSelf(layer)) {
// Assumption: the current object is either not a layer, or it is the current layer.
if (mCurrentObject == mCurrentLayer)
setCurrentObject(nullptr);

setCurrentLayer(nullptr);
}

emit layerRemoved(layer);
}
Expand Down
1 change: 1 addition & 0 deletions src/tiled/mapdocumentactionhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ void MapDocumentActionHandler::updateActions()
}

mActionSelectAll->setEnabled(map);
mActionSelectInverse->setEnabled(map);

if (currentLayer) {
if (currentLayer->asTileLayer()) {
Expand Down
2 changes: 1 addition & 1 deletion tiled.pri
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Initialize the version
isEmpty(TILED_VERSION):TILED_VERSION = "1.0.2"
isEmpty(TILED_VERSION):TILED_VERSION = "1.0.3"

# See the README file for instructions about setting the install prefix.
isEmpty(PREFIX):PREFIX = /usr/local
Expand Down
2 changes: 1 addition & 1 deletion tiled.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Project {
qbsSearchPaths: "qbs"
minimumQbsVersion: "1.6"

property string version: Environment.getEnv("TILED_VERSION") || "1.0.2";
property string version: Environment.getEnv("TILED_VERSION") || "1.0.3";
property bool sparkleEnabled: Environment.getEnv("TILED_SPARKLE")
property bool snapshot: Environment.getEnv("TILED_SNAPSHOT")
property bool release: Environment.getEnv("TILED_RELEASE")
Expand Down

0 comments on commit 53a96e6

Please sign in to comment.