Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_text/space_text.c
| Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | case NC_TEXT: | ||||
| * (reference == NULL) means text was unlinked, should update anyway for this | * (reference == NULL) means text was unlinked, should update anyway for this | ||||
| * case -- no way to know was text active before unlinking or not */ | * case -- no way to know was text active before unlinking or not */ | ||||
| if (wmn->reference && wmn->reference != st->text) { | if (wmn->reference && wmn->reference != st->text) { | ||||
| break; | break; | ||||
| } | } | ||||
| switch (wmn->data) { | switch (wmn->data) { | ||||
| case ND_DISPLAY: | case ND_DISPLAY: | ||||
| ED_area_tag_redraw(area); | |||||
| break; | |||||
| case ND_CURSOR: | case ND_CURSOR: | ||||
| if (st->text && st->text == wmn->reference) { | |||||
| text_scroll_to_cursor__area(st, area, true); | |||||
| } | |||||
| ED_area_tag_redraw(area); | ED_area_tag_redraw(area); | ||||
| break; | break; | ||||
| } | } | ||||
| switch (wmn->action) { | switch (wmn->action) { | ||||
| case NA_EDITED: | case NA_EDITED: | ||||
| if (st->text) { | if (st->text) { | ||||
| text_drawcache_tag_update(st, 1); | text_drawcache_tag_update(st, 1); | ||||
| text_update_edited(st->text); | text_update_edited(st->text); | ||||
| } | } | ||||
| ED_area_tag_redraw(area); | ED_area_tag_redraw(area); | ||||
| ATTR_FALLTHROUGH; /* fall down to tag redraw */ | ATTR_FALLTHROUGH; /* fall down to tag redraw */ | ||||
| case NA_ADDED: | case NA_ADDED: | ||||
| case NA_REMOVED: | case NA_REMOVED: | ||||
| ED_area_tag_redraw(area); | |||||
| break; | |||||
| case NA_SELECTED: | case NA_SELECTED: | ||||
| if (st->text && st->text == wmn->reference) { | ED_area_tag_redraw(area); | ||||
| text_scroll_to_cursor__area(st, area, true); | |||||
| } | |||||
| break; | break; | ||||
| } | } | ||||
| break; | break; | ||||
| case NC_SPACE: | case NC_SPACE: | ||||
| if (wmn->data == ND_SPACE_TEXT) { | if (wmn->data == ND_SPACE_TEXT) { | ||||
| ED_area_tag_redraw(area); | ED_area_tag_redraw(area); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 327 Lines • Show Last 20 Lines | |||||