Skip to content

Commit

Permalink
Select similar now requires selectionAddModifier to be held
Browse files Browse the repository at this point in the history
Causes axis bound movement indicator to flash, not ideal
Fixes dead clicks and target cycling weirdness
  • Loading branch information
Cruor committed Jul 20, 2024
1 parent 508d0bb commit 44437bb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/tools/selection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1448,17 +1448,19 @@ function tool.mouseclicked(x, y, button, istouch, presses)
local cursorX, cursorY = toolUtils.getCursorPositionInRoom(x, y)

if cursorX and cursorY then
if presses == 1 then
local addSelections = keyboardHelper.modifierHeld(configs.editor.selectionAddModifier)

if addSelections and presses % 2 == 0 then
local strict = keyboardHelper.modifierHeld(configs.editor.precisionModifier)

selectSimilar(strict)

else
selectionChanged(cursorX - 1, cursorY - 1, 3, 3, true)

selectionFinished(cursorX, cursorY, true)
resizeFinished(cursorX, cursorY)
movementFinished(cursorX, cursorY)

else
local strict = keyboardHelper.modifierHeld(configs.editor.precisionModifier)

selectSimilar(strict)
end
end

Expand Down

0 comments on commit 44437bb

Please sign in to comment.