Fix T69486: Reloading file in text editor marks file as modified

Differential Revision: https://developer.blender.org/D5847
This commit is contained in:
Pedro Reis 2019-09-20 12:46:13 +02:00 committed by Jacques Lucke
parent f5dc979a7e
commit fb6ef2ec8d
Notes: blender-bot 2023-02-14 10:09:24 +01:00
Referenced by issue #69486, Reloading 'text' file in 'Scripting' marks the file as modified
1 changed files with 2 additions and 0 deletions

View File

@ -443,6 +443,8 @@ static int text_reload_exec(bContext *C, wmOperator *op)
text_drawcache_tag_update(CTX_wm_space_text(C), 1);
WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
text->flags &= ~TXT_ISDIRTY;
/* return to scroll position */
st->top = orig_top;
txt_screen_clamp(st, ar);