From c875f7be46d76650e1c6a16668f77df7227d57d3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 10 Jun 2022 11:48:32 -0700 Subject: stop saving the entire file when modifying drawings Now we just disallow that entirely. --- drawing.lua | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drawing.lua') diff --git a/drawing.lua b/drawing.lua index acec83b..25fde99 100644 --- a/drawing.lua +++ b/drawing.lua @@ -206,7 +206,6 @@ function Drawing.in_drawing(drawing, x,y) end function Drawing.mouse_pressed(drawing, x,y, button) - Drawing.before = snapshot() if Current_drawing_mode == 'freehand' then drawing.pending = {mode=Current_drawing_mode, points={{x=Drawing.coord(x-16), y=Drawing.coord(y-drawing.y)}}} elseif Current_drawing_mode == 'line' or Current_drawing_mode == 'manhattan' then @@ -226,7 +225,6 @@ function Drawing.mouse_pressed(drawing, x,y, button) print(Current_drawing_mode) assert(false) end - Lines.current_drawing = drawing end -- a couple of operations on drawings need to constantly check the state of the mouse @@ -348,11 +346,6 @@ function Drawing.mouse_released(x,y, button) Lines.current_drawing = nil end end - save_to_disk(Lines, Filename) - if Drawing.before then - record_undo_event({before=Drawing.before, after=snapshot()}) - Drawing.before = nil - end end function Drawing.keychord_pressed(chord) -- cgit 1.4.1-2-gfad0