diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/debian/bzr-builder.manifest tiled-daily-0+git20170426~20~ubuntu16.10.1/debian/bzr-builder.manifest --- tiled-daily-0+git20170425~20~ubuntu16.10.1/debian/bzr-builder.manifest 2017-04-25 11:49:43.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/debian/bzr-builder.manifest 2017-04-26 11:47:01.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version 0+git20170425~20 -lp:tiled revid:git-v1:4810b57e83325e7b768d7388defa2365640aad64 +# bzr-builder format 0.3 deb-version 0+git20170426~20 +lp:tiled revid:git-v1:39c90a012bb05887a370a4faf5cdc5fa39aecfb6 merge packaging lp:~mapeditor.org/+junk/packaging revid:bjorn@lindeijer.nl-20160601220745-2nrijn3cex733sx4 diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/debian/changelog tiled-daily-0+git20170426~20~ubuntu16.10.1/debian/changelog --- tiled-daily-0+git20170425~20~ubuntu16.10.1/debian/changelog 2017-04-25 11:49:43.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/debian/changelog 2017-04-26 11:47:01.000000000 +0000 @@ -1,6 +1,6 @@ -tiled-daily (0+git20170425~20~ubuntu16.10.1) yakkety; urgency=low +tiled-daily (0+git20170426~20~ubuntu16.10.1) yakkety; urgency=low * Auto build. - -- Launchpad Package Builder Tue, 25 Apr 2017 11:49:43 +0000 + -- Launchpad Package Builder Wed, 26 Apr 2017 11:47:01 +0000 diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/index.md tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/index.md --- tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/index.md 2017-04-25 11:49:36.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/index.md 2017-04-26 11:46:55.000000000 +0000 @@ -2,7 +2,7 @@ Welcome to the documentation pages for [Tiled](http://www.mapeditor.org), a flexible tile map editor! Here you will find the -[Tiled User Manual](manual/index.md) and the +[Tiled User Manual](#tiled-user-manual) and the [TMX Map Format](reference/tmx-map-format.md) reference. If you're not finding what you're looking for in these pages, please don't @@ -18,9 +18,13 @@ ### Tiled User Manual * [Introduction](manual/introduction.md) +* [Working with Layers](manual/layers.md) +* [Editing Tile Layers](manual/editing-tile-layers.md) +* [Working with Objects](manual/objects.md) * [Custom Properties](manual/custom-properties.md) * [Using the Terrain Tool](manual/using-the-terrain-tool.md) * [Using Commands](manual/using-commands.md) +* [Keyboard Shortcuts](manual/keyboard-shortcuts.md) ### Reference diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/editing-tile-layers.md tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/editing-tile-layers.md --- tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/editing-tile-layers.md 1970-01-01 00:00:00.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/editing-tile-layers.md 2017-04-26 11:46:55.000000000 +0000 @@ -0,0 +1,103 @@ +# Editing Tile Layers + +[Tile Layers](layers.md#tile-layers) are what makes Tiled a _tile map editor_. +Although not as flexible as [Object Layers](layers.md#object-layers), they +provide efficient data storage and good rendering performance as well as +efficient content creation. Every new map gets one by default, though feel free +to delete it when you're not going to use it. + +## Stamp Brush + +Shortcut: `B` + +The primary tool for editing tile layers is the Stamp Brush. It can be used to +paint single tiles as well as larger "stamps", which is where it gets its name +from. Using the right mouse button, it can also quickly capture tile stamps +from the currently active layer. A tile stamp is commonly created by selecting +one or more tiles in the Tilesets view. + +The Stamp Brush has some extra features: + +* While holding `Shift`, click any two points to draw a line between them. + +* While holding `Ctrl+Shift`, click any two points two draw a circle or ellipse + centered on the first point. + +* Activate the _Random Mode_ using the dice button on the tool bar to have the + Stamp Brush paint with random tiles from the tile stamp. The probability of + each tile depends on how often it occurred on the tile stamp, as well as + the probability set on each tile in the _Tileset Editor_. + +* In combination with the _Tile Stamps_ view, it can also place randomly from a + set of predefined tile stamps. This can be more useful than the _Random Mode_, + which randomly places individual tiles. + +## Terrain Brush + +Shortcut: `T` + +The Terrain Brush allows for efficient editing with a certain type of +corner-based terrain transitions. Setting it up requires associating terrain +information with your tiles, which is described in detail in +[Using the Terrain Tool](using-the-terrain-tool.md). + +Similarly to the [Stamp Brush](#stamp-brush), you can draw lines by holding +`Shift`. When holding `Ctrl`, the size of the editing area is reduced to one +corner (this currently doesn't work well in combination with drawing lines). + +
New in Tiled 1.0
+ +When holding `Alt`, the editing operations are also applied at a 180 degree +rotation. This is especially useful when editing strategic maps where two sides +need to have equal opportunities. The modifier works well in combination with +either `Shift` for drawing lines or `Ctrl` for reducing the edited area. + +## Bucket Fill Tool + +Shortcut: `F` + +The Bucket Fill Tool provides a quick way of filling empty areas or areas +covered with the same tiles. The currently active tile stamp will be repeated in +the filled area. It can also be used in combination with the _Random Mode_. + +When holding `Shift`, the tool fills the currently selected area regardless of +its contents. This is useful for filling custom areas that have been selected +previously using one or more [Selection Tools](#selection-tools). + +## Eraser + +Shortcut: `E` + +A simple eraser tool. Left click erases single tiles and right click can be used +to quickly erase rectangular areas. + +## Selection Tools + +There are various selection tools that all work in similar fashion: + +* **Rectangular Select** allows selection of rectangular areas (shortcut: `R`) + +* **Magic Wand** allows selection of connected areas filled with the same + tile (shortcut: `W`) + +* **Select Same Tile** allows selection of same-tiles across the entire layer + (shortcut: `S`) + +By default, each of these tools replaces the currently selected area. The +following modifiers can be used to change this behavior: + +* Holding `Shift` expands the current selection with the new area +* Holding `Ctrl` subtracts the new area from the current selection +* Holding `Ctrl` and `Shift` selects the intersection of the new area with the + current selection + +## Managing Tile Stamps + +It can often be useful to store the current tile stamp somewhere to use it again +later. The following shortcuts work for this purpose: + +* `Ctrl + 1-9` - Store current tile stamp (similar to `Ctrl + C`) +* `1-9` - Recall the stamp stored at this location (similar to `Ctrl + V`) + +Tile stamps can also be stored by name and extended with variations using the +_Tile Stamps_ view. diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/index.md tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/index.md --- tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/index.md 2017-04-25 11:49:36.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/index.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -# Tiled User Manual - -*This documentation is currently work-in-progress. Initially the relevant pages -from the wiki have been ported over, providing a limited amount of -documentation for specific Tiled features. Over time, this should become the -place to refer to for any details about using Tiled.* - -## Contents - -* [Introduction](introduction.md) -* [Custom Properties](custom-properties.md) -* [Using the Terrain Tool](using-the-terrain-tool.md) -* [Using Commands](using-commands.md) diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/introduction.md tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/introduction.md --- tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/introduction.md 2017-04-25 11:49:36.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/introduction.md 2017-04-26 11:46:55.000000000 +0000 @@ -2,7 +2,7 @@ ## About Tiled -**Tiled is a 2D level editor that helps you develop the content of your game. Its primary feature is to edit tile maps of various forms, but it also supports free image placement as well as powerful ways to annotate your level with extra information used by the game. Tiled focuses on general flexiblity while trying to stay intuitive.** +**Tiled is a 2D level editor that helps you develop the content of your game. Its primary feature is to edit tile maps of various forms, but it also supports free image placement as well as powerful ways to annotate your level with extra information used by the game. Tiled focuses on general flexibility while trying to stay intuitive.** In terms of tile maps, it supports straight rectangular tile layers, but also projected isometric, staggered isometric and staggered hexagonal layers. A tileset can be either a single image containing many tiles, or it can be a collection of individual images. In order to support certain depth faking techniques, tiles and layers can be offset by a custom distance and their rendering order can be configured. @@ -36,6 +36,8 @@ ![Tileset Added](images/introduction/tiled-new-map-tileset-added.png) -We're ready to select some tiles and start painting! +We're ready to select some tiles and [start painting](editing-tile-layers.md)! +But first, let's have a quick look at the [various layer types](layers.md) +supported by Tiled. *Most of the manual still needs to be written. Fortunately, there is a very nice [Tiled Map Editor Tutorial Series](http://www.gamefromscratch.com/post/2015/10/14/Tiled-Map-Editor-Tutorial-Series.aspx) on GamesFromScratch.com. In addition, the support for Tiled in various [engines and frameworks](../reference/support-for-tmx-maps.md) often comes with some usage information.* diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/layers.md tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/layers.md --- tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/layers.md 2017-04-25 11:49:36.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/layers.md 2017-04-26 11:46:55.000000000 +0000 @@ -4,7 +4,12 @@ into various different layers. The most common layers are the [Tile Layer](#tile-layers) and the [Object Layer](#object-layers). There is also an [Image Layer](#image-layers) for including simple foreground or -background graphics. +background graphics. The order of the layers determines the rendering order of +your content. + +Layers can be hidden or made only partially visible. Layers also have an offset, +which can be used to position them independently of each other, for example to +fake depth. You use [Group Layers](#group-layers) to organize the layers into a hierarchy. This makes it more comfortable to work with a large amount of layers. @@ -12,14 +17,16 @@ ## Tile Layers Tile layers provide an efficient way of storing a large area filled with tile -data. The data is an array of tile references and as such no additional -information can be stored for each location. - -The only information stored in addition to the tile reference are some flags, -that allow tile graphics to be flipped vertically, horizontally or anti- -diagonally (to support rotation in 90-degree increments). +data. The data is a simple array of tile references and as such no additional +information can be stored for each location. The only extra information stored +are a few flags, that allow tile graphics to be flipped vertically, horizontally +or anti-diagonally (to support rotation in 90-degree increments). + +The information needed to render each tile layer is stored with the map, which +specifies the position and rendering order of the tiles based on the orientation +and various other properties. -Despite only being able to refer to tiles, tile layers can still be useful for +Despite only being able to refer to tiles, tile layers can also be useful for defining various bits of non-graphical information in your level. Collision information can often be conveyed using a special tileset, and any kind of object that does not need custom properties and is always aligned to the grid @@ -38,7 +45,7 @@ collision area) * **Polyline** - can be a path to follow or a wall to collide with * **Tile** - for freely placing, scaling and rotating your tile graphics -* **Text** - for custom text or notes +* **Text** - for custom text or notes (since Tiled 1.0) All objects can be named, in which case their name will show up in a label above them (by default only for selected objects). Objects can also be given a _type_, @@ -47,6 +54,19 @@ for this object type. For tile objects, the type can be [inherited from their tile](custom-properties.md#tile-property-inheritance). +For most map types, objects are positioned in plain pixels. The only exception +to this are isometric maps (not isometric staggered). For isometric maps, it was +deemed useful to store their positions in a projected coordinate space. For +this, the isometric tiles are assumed to represent projected squares with both +sides equal to the _tile height_. If you're using a different coordinate space +for objects in your isometric game, you'll need to convert these coordinates +accordingly. + +The object width and height is also mostly stored in pixels. For isometric maps, +all shape objects (rectangle, ellipse, polygon and polyline) are projected into +the same coordinate space described above. This is based on the assumption that +these objects are generally used to mark areas on the map. + ## Image Layers Image layers provide a way to quickly include a single image as foreground or @@ -66,9 +86,10 @@ hierarchy. This is mainly useful when your map contains a large amount of layers. -The visibility and opacity of a group layer affects all child layers. Layers can -be easily dragged in and out of groups with the mouse. The Raise Layer / Lower -Layer actions also allow moving layers in and out of groups. +The visibility, opacity and offset of a group layer affects all child layers. + +Layers can be easily dragged in and out of groups with the mouse. The Raise +Layer / Lower Layer actions also allow moving layers in and out of groups.
## Future Extensions @@ -78,7 +99,7 @@ even individual objects ([#828](https://github.com/bjorn/tiled/issues/828)). * Moving certain map-global properties to the Tile Layer ([#149](https://github.com/bjorn/tiled/issues/149)). It would be useful if - one map could accomodate layers of different tile sizes and maybe even of + one map could accommodate layers of different tile sizes and maybe even of different orientation. * "Infinite" tile layers that grow automatically ([#260](https://github.com/bjorn/tiled/issues/260)). diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/objects.md tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/objects.md --- tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/objects.md 1970-01-01 00:00:00.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/objects.md 2017-04-26 11:46:55.000000000 +0000 @@ -0,0 +1,214 @@ +# Working with Objects + +Using objects you can add a great deal of information to your map for use in +your game. They can replace tedious alternatives like hardcoding coordinates +(like spawn points) in your source code or maintaining additional data files for +storing gameplay elements. With the addition of _tile objects_, they also became +useful for graphical purposes and can in some cases replace tile layers +entirely, as demonstrated by the "Sticker Knight" example shipping with Tiled. + +To start using objects, add an [Object Layer](layers.md#object-layers) to your map. + +## Placement Tools + +Each type of object has its own placement tool. + +### Insert Rectangle + +Shortcut: `R` + +The rectangle was the first type of object supported by Tiled, which is why +objects are rectangles by default in the +[TMX map format](../reference/tmx-map-format.md). They are useful for marking +rectangular areas and assigning custom properties to them. They are also often +used for specifying collision boxes. + +Place a rectangle by clicking-and-dragging in any direction. Holding `Shift` +makes it square and holding `Ctrl` snaps its size to the tile size. + +If the rectangle is empty (width and height are both 0), it is rendered as a +small square around its position. This is mainly to keep it visible and +selectable. Empty rectangles can be used for placing point objects, at least as +long as no explicit support for point objects is available +([#1325](https://github.com/bjorn/tiled/issues/1325)). + +### Insert Ellipse + +Shortcut: `C` + +Ellipses work the same way as [rectangles](#insert-rectangle), except that they +are rendered as an ellipse. Useful for when your area or collision shape needs +to represent a circle or ellipse. + +### Insert Polygon + +Shortcut: `P` + +Polygons are the most flexible way of defining the shape of an area. They are +most commonly used for defining collision shapes. + +When placing a polygon, the first click determines the location of the object as +well as the location of the first point of the polygon. Subsequent clicks are +used to add additional points to the polygon. Right click or press `Enter` to +finish creating the polygon. Polygons needs to have at least three points. You +can press `Escape` to cancel the creation of the polygon. + +When you want to change a polygon after it has been placed, you need to use the +[Edit Polygons](#edit-polygons) tool. + +### Insert Polyline + +Shortcut: `L` + +Polylines work very similar to [polygons](#insert-polygon), except that they are +rendered as a line and require only two points. While they can represent +collision walls, they are also often used to represent paths to be followed. + +Despite its name, the [Edit Polygons](#edit-polygons) tool is also used to edit +polylines. + +### Insert Tile + +Shortcut: `T` + +Tiles can be inserted as objects to have full flexibility in placing, scaling +and rotating the tile image on your map. Like all objects, tile objects can also +have custom properties associated with them. This makes them useful for +placement of recognizable interactive objects that need special information, +like a chest with defined contents or an NPC with defined script. + +To place a tile object, first select the tile you want to place in the Tilesets +view. Then use the Left mouse button on the map to start placing the object, +move to position it based on the preview and release to finish placing the +object. + +
New in Tiled 1.0
+ +To change the tile used by existing tile objects, select all the objects you +want to change using the [Select Objects](#select-objects) tool and then +right-click on a tile in the Tilesets view, and choose _Replace Tile of Selected +Objects_. + +
New in Tiled 1.0
+ +### Insert Text + +Shortcut: `X` + +Text objects can be used to add arbitrary multi-line text to your maps. You can +configure various font properties and the wrapping / clipping area, making them +useful for both quick notes as well as text used in the game. + +## Select Objects + +Shortcut: `S` + +When you're not inserting new objects, you're generally using the Select Objects +tool. It packs a lot of functionality, which is outlined below. + +### Selecting and Deselecting + +You can select objects by clicking them or by dragging a rectangular lasso, +selecting any object that intersect with its area. By holding `Shift` or `Ctrl` +while clicking, you can add/remove single objects to/from the selection. + +When pressing and dragging on an object, this object is selected and moved. When +this prevents you from starting a rectangular selection, you can hold `Shift` to +force the selection rectangle. + +
New in Tiled 1.0
+ +By default you interact with the top-most object. When you need to select an +object below another object, first select the higher object and then hold `Alt` +while clicking at the same location to select lower objects. You can also hold +`Alt` while opening the context menu to get a list of all objects at the clicked +location, so you may directly select the desired object. + +### Moving + +You can simply drag any single object, or drag already selected objects by +dragging any one of them. Hold `Ctrl` to toggle snapping to the tile grid. + +Hold `Alt` to force a move operation on the currently selected objects, +regardless of where you click on the map. This is useful when the selected +objects are small or covered by other objects. + +The selected objects can also be moved with the arrow keys. By default this +moves the objects pixel by pixel. Hold `Shift` while using the arrow keys to +move the objects by distance of one tile. + +### Resizing + +You can use the resize handles to resize one or more selected objects. Hold +`Ctrl` to keep the aspect ratio of the object and/or `Shift` to place the resize +origin in the center. + +Note that you can only change width and height independently when resizing a +single object. When having multiple objects selected, the aspect ratio is +constant because there would be no way to make that work for rotated objects +without full support for transformations. + +### Rotating + +To rotate, click any selected object to change the resize handles into rotation +handles. Before rotating, you can drag the rotation origin to another position +if necessary. Hold `Shift` to rotate in 15-degree increments. Click any selected +object again to go back to resize mode. + +You can also rotate the selected objects in 90-degree steps by pressing `Z` or +`Shift + Z`. + +### Changing Stacking Order + +If the active [Object Layer](layers.md#object-layer) has its Drawing Order +property set to Manual (the default is Top Down), you can control the stacking +order of the selected objects within their object layer using the following +keys: + +* `PgUp` - Raise selected objects +* `PgDown` - Lower selected objects +* `Home` - Move selected objects to Top +* `End` - Move selected objects to Bottom + +You can also find these actions in the context menu. When you have multiple +Object Layers, the context menu also contains actions to move the selected +objects to another layer. + +### Flipping Objects + +You can flip the selected objects horizontally by pressing `X` or vertically by +pressing `Y`. For tile objects, this also flips their images. + +## Edit Polygons + +Shortcut: `E` + +Polygons and polylines have their own editing needs and as such are covered by a +separate tool, which allows selecting and moving around their nodes. You can +select and move the nodes of multiple polygons at the same time. + +Nodes can be deleted by selecting them and choosing "Delete Nodes" from the +context menu. Careful with the `Delete` key, because that will delete the entire +polygon ([#1555](https://github.com/bjorn/tiled/issues/1555)). + +When you have selected multiple consecutive nodes of the same polygon, you can +join them together by choosing "Join Nodes" from the context menu. You can also +split the segments in between the nodes by choosing "Split Segments", which is +currently the only way to extend an existing polygon. +
+## Future Extensions + +Here are some ideas about improvements that could be made to the above tools: + +* For the [Insert Tile](#insert-tile) tool, show the preview already before + pressing the left mouse button + ([#537](https://github.com/bjorn/tiled/issues/537)) + +* Many improvements could be made to the support for editing polygons and + polylines, like allowing to rotate and scale the selected nodes + ([#1487](https://github.com/bjorn/tiled/issues/1487)). + +If you like any of these plans, please help me getting around to it faster by +[becoming a patron](https://www.patreon.com/bjorn). The more support I +receive the more time I can afford to spend improving Tiled! +
diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/using-the-terrain-tool.md tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/using-the-terrain-tool.md --- tiled-daily-0+git20170425~20~ubuntu16.10.1/docs/manual/using-the-terrain-tool.md 2017-04-25 11:49:36.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/docs/manual/using-the-terrain-tool.md 2017-04-26 11:46:55.000000000 +0000 @@ -46,7 +46,7 @@ ![Drawing Cobblestone](images/terraintool/07-drawing-cobblestone.png) -Try holding `Control` (`command` on a Mac) while drawing. This reduces the modified area to just the closest corner to the mouse, allowing for precision work. +Try holding `Control` (`Command` on a Mac) while drawing. This reduces the modified area to just the closest corner to the mouse, allowing for precision work. Finally, see what happens when you try drawing some dirt on the cobblestone. Because there are no transitions from dirt directly to cobblestone, the Terrain tool first inserts transitions to sand and from there to cobblestone. Neat! diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/mkdocs.yml tiled-daily-0+git20170426~20~ubuntu16.10.1/mkdocs.yml --- tiled-daily-0+git20170425~20~ubuntu16.10.1/mkdocs.yml 2017-04-25 11:49:36.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/mkdocs.yml 2017-04-26 11:46:55.000000000 +0000 @@ -6,9 +6,10 @@ pages: - Index: index.md - Manual: - - Contents: manual/index.md - Introduction: manual/introduction.md - Working with Layers: manual/layers.md + - Editing Tile Layers: manual/editing-tile-layers.md + - Working with Objects: manual/objects.md - Custom Properties: manual/custom-properties.md - Using the Terrain Tool: manual/using-the-terrain-tool.md - Using Commands: manual/using-commands.md diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/.pc/.quilt_patches tiled-daily-0+git20170426~20~ubuntu16.10.1/.pc/.quilt_patches --- tiled-daily-0+git20170425~20~ubuntu16.10.1/.pc/.quilt_patches 2017-04-25 11:49:43.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/.pc/.quilt_patches 2017-04-26 11:47:01.000000000 +0000 @@ -1 +1 @@ -/home/buildd/build-RECIPEBRANCHBUILD-1358515/chroot-autobuild/home/buildd/work/tree/tiled-daily-0+git20170425~20~ubuntu16.10.1/debian/patches +/home/buildd/build-RECIPEBRANCHBUILD-1359209/chroot-autobuild/home/buildd/work/tree/tiled-daily-0+git20170426~20~ubuntu16.10.1/debian/patches diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/.pc/.quilt_series tiled-daily-0+git20170426~20~ubuntu16.10.1/.pc/.quilt_series --- tiled-daily-0+git20170425~20~ubuntu16.10.1/.pc/.quilt_series 2017-04-25 11:49:43.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/.pc/.quilt_series 2017-04-26 11:47:01.000000000 +0000 @@ -1 +1 @@ -/home/buildd/build-RECIPEBRANCHBUILD-1358515/chroot-autobuild/home/buildd/work/tree/tiled-daily-0+git20170425~20~ubuntu16.10.1/debian/patches/series +/home/buildd/build-RECIPEBRANCHBUILD-1359209/chroot-autobuild/home/buildd/work/tree/tiled-daily-0+git20170426~20~ubuntu16.10.1/debian/patches/series diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/src/tiled/editpolygontool.cpp tiled-daily-0+git20170426~20~ubuntu16.10.1/src/tiled/editpolygontool.cpp --- tiled-daily-0+git20170425~20~ubuntu16.10.1/src/tiled/editpolygontool.cpp 2017-04-25 11:49:36.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/src/tiled/editpolygontool.cpp 2017-04-26 11:46:55.000000000 +0000 @@ -215,7 +215,7 @@ template static T *first(const QList &items) { - foreach (QGraphicsItem *item, items) { + for (QGraphicsItem *item : items) { if (T *t = qgraphicsitem_cast(item)) return t; } @@ -341,11 +341,11 @@ void EditPolygonTool::setSelectedHandles(const QSet &handles) { - foreach (PointHandle *handle, mSelectedHandles) + for (PointHandle *handle : mSelectedHandles) if (!handles.contains(handle)) handle->setSelected(false); - foreach (PointHandle *handle, handles) + for (PointHandle *handle : handles) if (!mSelectedHandles.contains(handle)) handle->setSelected(true); @@ -365,7 +365,8 @@ while (i.hasNext()) { i.next(); if (!selection.contains(i.key())) { - foreach (PointHandle *handle, i.value()) { + const auto &handles = i.value(); + for (PointHandle *handle : handles) { if (handle->isSelected()) mSelectedHandles.remove(handle); delete handle; @@ -377,7 +378,7 @@ MapRenderer *renderer = mapDocument()->renderer(); - foreach (MapObjectItem *item, selection) { + for (MapObjectItem *item : selection) { const MapObject *object = item->mapObject(); if (!object->cell().isEmpty()) continue; @@ -421,7 +422,7 @@ // finishing the move operation. // TODO: In addition to avoiding crashes, it would also be good to // disallow other actions while moving. - foreach (MapObject *object, objects) + for (MapObject *object : objects) mOldPolygons.remove(object); } } @@ -436,14 +437,16 @@ const QSet oldSelection = mapScene()->selectedObjectItems(); + const auto intersectedItems = mapScene()->items(rect, + Qt::IntersectsItemShape, + Qt::DescendingOrder, + viewTransform(event)); + if (oldSelection.isEmpty()) { // Allow selecting some map objects only when there aren't any selected QSet selectedItems; - foreach (QGraphicsItem *item, mapScene()->items(rect, - Qt::IntersectsItemShape, - Qt::DescendingOrder, - viewTransform(event))) { + for (QGraphicsItem *item : intersectedItems) { MapObjectItem *mapObjectItem = dynamic_cast(item); if (mapObjectItem) selectedItems.insert(mapObjectItem); @@ -464,10 +467,7 @@ // Update the selected handles QSet selectedHandles; - foreach (QGraphicsItem *item, mapScene()->items(rect, - Qt::IntersectsItemShape, - Qt::DescendingOrder, - viewTransform(event))) { + for (QGraphicsItem *item : intersectedItems) { if (PointHandle *handle = dynamic_cast(item)) selectedHandles.insert(handle); } @@ -500,7 +500,8 @@ mOldPolygons.clear(); mAlignPosition = renderer->screenToPixelCoords((*mSelectedHandles.begin())->pos()); - foreach (PointHandle *handle, mSelectedHandles) { + const auto &selectedHandles = mSelectedHandles; + for (PointHandle *handle : selectedHandles) { const QPointF pos = renderer->screenToPixelCoords(handle->pos()); mOldHandlePositions.append(handle->pos()); if (pos.x() < mAlignPosition.x()) @@ -532,8 +533,10 @@ diff = renderer->pixelToScreenCoords(newAlignPixelPos) - alignScreenPos; } + const auto &selectedHandles = mSelectedHandles; + int i = 0; - foreach (PointHandle *handle, mSelectedHandles) { + for (PointHandle *handle : selectedHandles) { // update handle position const QPointF newScreenPos = mOldHandlePositions.at(i) + diff; handle->setPos(newScreenPos); @@ -616,7 +619,7 @@ PointIndexesByObject result; // Build the list of point indexes for each map object - foreach (PointHandle *handle, handles) { + for (PointHandle *handle : handles) { RangeSet &pointIndexes = result[handle->mapObject()]; pointIndexes.insert(handle->pointIndex()); } diff -Nru tiled-daily-0+git20170425~20~ubuntu16.10.1/src/tiled/stampbrush.cpp tiled-daily-0+git20170426~20~ubuntu16.10.1/src/tiled/stampbrush.cpp --- tiled-daily-0+git20170425~20~ubuntu16.10.1/src/tiled/stampbrush.cpp 2017-04-25 11:49:36.000000000 +0000 +++ tiled-daily-0+git20170426~20~ubuntu16.10.1/src/tiled/stampbrush.cpp 2017-04-26 11:46:55.000000000 +0000 @@ -368,7 +368,7 @@ return; QRegion paintedRegion; - foreach (const QPoint p, list) + for (const QPoint p : list) paintedRegion += QRect(p, QSize(1, 1)); QRect bounds = paintedRegion.boundingRect();