Skip to content

Commit

Permalink
Fixed terrain brush eraser mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn committed Jul 25, 2017
1 parent 01944e9 commit 088a327
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libtiled/tilelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void Tiled::TileLayer::setCell(int x, int y, const Cell &cell)
{
Q_ASSERT(contains(x, y));

if (cell.isEmpty() && !findChunk(x, y))
if (cell == mEmptyCell && !findChunk(x, y))
return;

Chunk &_chunk = chunk(x, y);
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/terrainbrush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void TerrainBrush::updateBrush(QPoint cursorPos, const QVector<QPoint> *list)
QRect bounds;
for (ConsiderationPoint point : transitionList)
bounds |= QRect(point, point);
int margin = terrainTileset ? terrainTileset->maximumTerrainDistance() : 0;
int margin = terrainTileset ? terrainTileset->maximumTerrainDistance() : 3;
bounds.adjust(-margin, -margin, margin, margin);
bounds = bounds.intersected(QRect(0, 0, stamp->width(), stamp->height()));

Expand Down

0 comments on commit 088a327

Please sign in to comment.