diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-07-11 08:25:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-07-17 14:19:22 +0300 |
commit | 366865dd020904116086e6d9ec46b8f70c42cdd1 (patch) | |
tree | 3e6cc12c3bf5a64c2ee36378817f0ff0afbdadcc /source/blender/makesrna | |
parent | 9e9fbb39d7f9e0a63c71fbc96237ace62fae0db6 (diff) |
Undo System: replace with simpler binary diffing buffer storage
Applying/undoing incremental changes didn't fit well when
mixed with periodic snapshots from mem-file undo.
This moves to a much simpler undo system.
- Uses array storage with de-duplication from `BLI_array_store`.
- Loads the buffer into existing text data,
for better performance on large files.
- Has the advantage that Python operators can be supported
since we don't depend on hard coded undo operations.
Solves T67045, T66695, T65909.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_text_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c index ad36a56ac6a..4ca48226ee9 100644 --- a/source/blender/makesrna/intern/rna_text_api.c +++ b/source/blender/makesrna/intern/rna_text_api.c @@ -34,13 +34,13 @@ static void rna_Text_clear(Text *text) { - BKE_text_clear(text, NULL); + BKE_text_clear(text); WM_main_add_notifier(NC_TEXT | NA_EDITED, text); } static void rna_Text_write(Text *text, const char *str) { - BKE_text_write(text, NULL, str); + BKE_text_write(text, str); WM_main_add_notifier(NC_TEXT | NA_EDITED, text); } |