about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-14 16:52:13 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-14 16:52:13 -0700
commit06daa49723c21cb40d27281665d816f38f4290e0 (patch)
treee7618e01d59218305f1b24037485c31ddc0444ff
parent89b6eda6b98df75c8ce5cea49cc2d578f65c98ad (diff)
downloadlines.love-06daa49723c21cb40d27281665d816f38f4290e0.tar.gz
.
-rw-r--r--main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index adcd948..a1c99cc 100644
--- a/main.lua
+++ b/main.lua
@@ -161,10 +161,10 @@ function propagate_to_drawings(x,y, button)
       local x, y = love.mouse.getX(), love.mouse.getY()
       if y >= drawing.y and y < drawing.y + pixels(drawing.h) and x >= 16 and x < 16+drawingw then
         if current_mode == 'freehand' then
-          drawing.pending = {mode='freehand', points={x=coord(x-16), y=coord(y-drawing.y)}}
+          drawing.pending = {mode=current_mode, points={x=coord(x-16), y=coord(y-drawing.y)}}
         elseif current_mode == 'line' then
           local j = insert_point(drawing.points, coord(x-16), coord(y-drawing.y))
-          drawing.pending = {mode='line', p1=j}
+          drawing.pending = {mode=current_mode, p1=j}
         end
         lines.current = drawing
       end