about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSushiTee <weichel.sascha@xxx.xx>2012-01-12 22:03:55 +0100
committerSushiTee <weichel.sascha@xxx.xx>2012-01-12 22:03:55 +0100
commitf737910e0a32466e0009734c31e2f1b921f64851 (patch)
treea48e75779ed5f4c5eedd76f0a7f1fb48f135a93d /src
parent4cce03c6e632c24d6e23377e8d071fb7d84eceac (diff)
downloadzcatch-f737910e0a32466e0009734c31e2f1b921f64851.tar.gz
zcatch-f737910e0a32466e0009734c31e2f1b921f64851.zip
fixed FillSelection so it actually fills the current selection
Diffstat (limited to 'src')
-rw-r--r--src/game/editor/layer_tiles.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/editor/layer_tiles.cpp b/src/game/editor/layer_tiles.cpp
index 7532c1bd..9a21e5ce 100644
--- a/src/game/editor/layer_tiles.cpp
+++ b/src/game/editor/layer_tiles.cpp
@@ -159,6 +159,8 @@ void CLayerTiles::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect)
 	if(m_Readonly)
 		return;
 
+	Snap(&Rect);
+
 	int sx = ConvertX(Rect.x);
 	int sy = ConvertY(Rect.y);
 	int w = ConvertX(Rect.w);
@@ -166,9 +168,9 @@ void CLayerTiles::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect)
 
 	CLayerTiles *pLt = static_cast<CLayerTiles*>(pBrush);
 
-	for(int y = 0; y <= h; y++)
+	for(int y = 0; y < h; y++)
 	{
-		for(int x = 0; x <= w; x++)
+		for(int x = 0; x < w; x++)
 		{
 			int fx = x+sx;
 			int fy = y+sy;