1
0
mirror of https://github.com/LDDestroier/CC/ synced 2025-08-30 09:27:59 +00:00

Fixed accidental lines when color picking

Also fixed it when, while using the fill tool, it'll save to the undo buffer mid-fill.
This commit is contained in:
LDDestroier
2018-12-19 22:20:03 -05:00
committed by GitHub
parent f87ee38392
commit 3e27651a94

View File

@@ -1882,7 +1882,6 @@ local fillTool = function(_frame,cx,cy,dot,isDeleting) -- "_frame" is the frame
end end
end end
paintEncoded = clearAllRedundant(paintEncoded) paintEncoded = clearAllRedundant(paintEncoded)
saveToUndoBuffer()
end end
local boxCharSelector = function() local boxCharSelector = function()
@@ -3026,7 +3025,7 @@ local getInput = function() --gotta catch them all
if res == "exit" then break end if res == "exit" then break end
doRender = true doRender = true
end end
elseif (evt[1] == "mouse_up") and (not viewing) then elseif (evt[1] == "mouse_up") and (not viewing) and (not isCurrentlyFilling) then
origx,origy = 0,0 origx,origy = 0,0
local button = evt[2] local button = evt[2]
miceDown[button] = false miceDown[button] = false
@@ -3254,9 +3253,9 @@ local getInput = function() --gotta catch them all
x = 2*x x = 2*x
y = 3*y y = 3*y
end end
os.queueEvent("filltool_async", frame, x, y, paint, mevt[2] == 2)
miceDown = {} miceDown = {}
keysDown = {} keysDown = {}
os.queueEvent("filltool_async", frame, x, y, paint, mevt[2] == 2)
end end
doRender = true doRender = true
changedImage = true changedImage = true
@@ -3290,8 +3289,7 @@ local getInput = function() --gotta catch them all
break break
end end
end end
miceDown = {} resetInputState()
keysDown = {}
end end
doRender = true doRender = true
isDragging = false isDragging = false
@@ -3445,6 +3443,7 @@ runPainEditor = function(...) --needs to be cleaned up
isCurrentlyFilling = true isCurrentlyFilling = true
renderBottomBar("Filling area...") renderBottomBar("Filling area...")
fillTool(frameNo, x, y, dot, isDeleting) fillTool(frameNo, x, y, dot, isDeleting)
saveToUndoBuffer()
isCurrentlyFilling = false isCurrentlyFilling = false
reRenderPAIN(doRenderBar == 0) reRenderPAIN(doRenderBar == 0)
end end