Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-09 06:07:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-09 08:08:40 +0300
commit9012ad155c4f92a48f9c684c0dc5c7dd9a481cca (patch)
treea9df426328e6a700059dd52c061e16ca7e981e2f /source/blender/editors/space_text/text_undo.c
parenta4d21441f98dbd516095e43f741b2e69911a3a1e (diff)
Fix T59165: Text operations fail to undo
Some undo operations encode multiple actions, now all are undone/redone.
Diffstat (limited to 'source/blender/editors/space_text/text_undo.c')
-rw-r--r--source/blender/editors/space_text/text_undo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_undo.c b/source/blender/editors/space_text/text_undo.c
index b8ae9972eec..29871bf5c85 100644
--- a/source/blender/editors/space_text/text_undo.c
+++ b/source/blender/editors/space_text/text_undo.c
@@ -120,12 +120,18 @@ static void text_undosys_step_decode(struct bContext *C, UndoStep *us_p, int dir
if (dir < 0) {
TextUndoBuf data = us->data;
- txt_do_undo(text, &data);
+ while (data.pos > -1) {
+ txt_do_undo(text, &data);
+ }
+ BLI_assert(data.pos == -1);
}
else {
TextUndoBuf data = us->data;
data.pos = -1;
- txt_do_redo(text, &data);
+ while (data.pos < us->data.pos) {
+ txt_do_redo(text, &data);
+ }
+ BLI_assert(data.pos == us->data.pos);
}
text_update_edited(text);