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-10 06:07:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-10 06:11:07 +0300
commitca8f5219718e7d13185d68f3e69ceb4d057c76e7 (patch)
tree3100be1906c80faafd600f0802e109684d6c3f48 /source/blender/editors/space_text/text_undo.c
parenta44ac44c1e1d1a4eff5824711e7763d9feae122b (diff)
Undo System: switch active text block when undoing
Diffstat (limited to 'source/blender/editors/space_text/text_undo.c')
-rw-r--r--source/blender/editors/space_text/text_undo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_undo.c b/source/blender/editors/space_text/text_undo.c
index 29871bf5c85..b427ce43dbb 100644
--- a/source/blender/editors/space_text/text_undo.c
+++ b/source/blender/editors/space_text/text_undo.c
@@ -134,9 +134,14 @@ static void text_undosys_step_decode(struct bContext *C, UndoStep *us_p, int dir
BLI_assert(data.pos == us->data.pos);
}
+ SpaceText *st = CTX_wm_space_text(C);
+ if (st) {
+ /* Not essential, always show text being undo where possible. */
+ st->text = text;
+ }
text_update_edited(text);
text_update_cursor_moved(C);
- text_drawcache_tag_update(CTX_wm_space_text(C), 1);
+ text_drawcache_tag_update(st, 1);
WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
}