diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-06-02 15:51:44 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-06-02 15:51:44 -0700 |
commit | b4e76eac4e4773d2f4a46bd5ced7c22d8ffc8b15 (patch) | |
tree | ed173c38f17b9c32f7df018ab063120bf4916618 /main.lua | |
parent | 670886240f78314b9925e94e1814a8ade5fbaf3e (diff) | |
download | view.love-b4e76eac4e4773d2f4a46bd5ced7c22d8ffc8b15.tar.gz |
bugfix: undo drawing creation
Also clean up drawing state to make sure we don't get into hard-to-debug situations.
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main.lua b/main.lua index 9372207..38fafa2 100644 --- a/main.lua +++ b/main.lua @@ -142,6 +142,7 @@ function App.draw() button('draw', {x=4,y=y+4, w=12,h=12, color={1,1,0}, icon = icon.insert_drawing, onpress1 = function() + Drawing.before = snapshot_everything() table.insert(Lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}}) if Cursor1.line >= line_index then Cursor1.line = Cursor1.line+1 |