stop saving the entire file when modifying drawings
[?]
Jun 10, 2022, 6:48 PM
3GFQP6IRHABYMDAEXEMM2HQNEUY4LT2P72PI3KXV4M6PSQT3SFLACDependencies
- [2]
7SFHSB47rename - [3]
2ENZW7TVselect text using mouse drag - [4]
NQKFQSZEundo creating new drawings - [5]
LUNH47XXmake text and drawings the same width - [6]
VHQCNMARseveral more modules - [7]
WTDKUACNrectangle and square shapes - [8]
DLQMM265scroll past first page - [9]
73OCE2MCafter much struggle, a brute-force undo - [10]
SQLVYKVJrename - [11]
VJ77YABHmore efficient undo/redo - [12]
U2TKUOIDbugfix: undo drawing creation - [13]
HYEAFRZ2split mouse_pressed events between Text and Drawing - [14]
6DE7RBZ6move mouse_released events to Drawing - [*]
OTIBCAUJlove2d scaffold - [*]
BLWAYPKVextract a module
Change contents
- replacement in undo.lua at line 39
if s == nil and e == nil thens = 1e = #Lineselseif e == nil thenassert(s)if e == nil then - edit in main.lua at line 293
Lines.current_drawing_index = line_indexLines.current_drawing = lineDrawing.before = snapshot(line_index) - edit in main.lua at line 306
save_to_disk(Lines, Filename)if Drawing.before thenrecord_undo_event({before=Drawing.before, after=snapshot(Lines.current_drawing_index)})Drawing.before = nilend - edit in drawing.lua at line 209
Drawing.before = snapshot() - edit in drawing.lua at line 228
Lines.current_drawing = drawing - edit in drawing.lua at line 349[4.3127]→[4.3127:3159](∅→∅),[4.3159]→[4.75:100](∅→∅),[4.100]→[4.677:742](∅→∅),[4.742]→[4.176:207](∅→∅),[4.176]→[4.176:207](∅→∅)
save_to_disk(Lines, Filename)if Drawing.before thenrecord_undo_event({before=Drawing.before, after=snapshot()})Drawing.before = nilend