Fix hook-through not being fully removed when filling selection

Closes #6782.
This commit is contained in:
Robert Müller 2023-07-10 21:28:27 +02:00
parent e0cc11e617
commit 756740e57e

View file

@ -464,10 +464,7 @@ void CLayerTiles::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect)
if(!Destructive && HasTile) if(!Destructive && HasTile)
continue; continue;
if(Empty) SetTile(fx, fy, Empty ? CTile{TILE_AIR} : pLt->m_pTiles[(y * pLt->m_Width + x % pLt->m_Width) % (pLt->m_Width * pLt->m_Height)]);
m_pTiles[fy * m_Width + fx].m_Index = 0;
else
SetTile(fx, fy, pLt->m_pTiles[(y * pLt->m_Width + x % pLt->m_Width) % (pLt->m_Width * pLt->m_Height)]);
} }
} }
FlagModified(sx, sy, w, h); FlagModified(sx, sy, w, h);