Skip to content

Commit

Permalink
Merge branch 'master' into ui-olympUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Cruor committed Jul 15, 2023
2 parents 866b4e1 + bb7f794 commit 9bf4830
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tools/selection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,15 @@ local function drawSelectionRectanglesCommon(room, targets, borderColor, fillCol
local x, y = target.x, target.y
local width, height = target.width, target.height

alreadyDrawn[target.item] = alreadyDrawn[target.item] or {}
local item = target.item
local node = target.node or 0

if not alreadyDrawn[target.item][target.node] then
alreadyDrawn[item] = alreadyDrawn[item] or {}

if not alreadyDrawn[item][node] then
love.graphics.rectangle("line", x - lineWidth / 2, y - lineWidth / 2, width + lineWidth, height + lineWidth)

alreadyDrawn[target.item][target.node] = true
alreadyDrawn[item][node] = true
end
end
end)
Expand Down

0 comments on commit 9bf4830

Please sign in to comment.