diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-08-14 09:17:53 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-08-14 09:20:14 -0700 |
commit | 9d792a203bb00b0f5521698fd1c6890f0cc12032 (patch) | |
tree | be2f89a515b0d5e7ff936c98cb5f4e17d618bbe4 /undo.lua | |
parent | 974d17ffc071e2eb254d0dbc11cf932c62e59d5c (diff) | |
download | view.love-9d792a203bb00b0f5521698fd1c6890f0cc12032.tar.gz |
new fork: rip out drawing support
Diffstat (limited to 'undo.lua')
-rw-r--r-- | undo.lua | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/undo.lua b/undo.lua index d699211..b3b9a00 100644 --- a/undo.lua +++ b/undo.lua @@ -60,19 +60,7 @@ function snapshot(State, s,e) -- deep copy lines without cached stuff like text fragments for i=s,e do local line = State.lines[i] - if line.mode == 'text' then - table.insert(event.lines, {mode='text', data=line.data}) - elseif line.mode == 'drawing' then - local points=deepcopy(line.points) ---? print('copying', line.points, 'with', #line.points, 'points into', points) - local shapes=deepcopy(line.shapes) ---? print('copying', line.shapes, 'with', #line.shapes, 'shapes into', shapes) - table.insert(event.lines, {mode='drawing', h=line.h, points=points, shapes=shapes, pending={}}) ---? table.insert(event.lines, {mode='drawing', h=line.h, points=deepcopy(line.points), shapes=deepcopy(line.shapes), pending={}}) - else - print(line.mode) - assert(false) - end + table.insert(event.lines, State.lines[i]) end return event end |