Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_text/space_text.c
| Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | static SpaceLink *text_duplicate(SpaceLink *sl) | ||||
| /* clear or remove stuff from old */ | /* clear or remove stuff from old */ | ||||
| stextn->runtime.drawcache = NULL; /* space need its own cache */ | stextn->runtime.drawcache = NULL; /* space need its own cache */ | ||||
| return (SpaceLink *)stextn; | return (SpaceLink *)stextn; | ||||
| } | } | ||||
| static void text_listener(wmWindow *UNUSED(win), | static void text_listener(const wmSpaceTypeListenerParams *params) | ||||
| ScrArea *area, | |||||
| wmNotifier *wmn, | |||||
| Scene *UNUSED(scene)) | |||||
| { | { | ||||
| ScrArea *area = params->area; | |||||
| wmNotifier *wmn = params->notifier; | |||||
| SpaceText *st = area->spacedata.first; | SpaceText *st = area->spacedata.first; | ||||
| /* context changes */ | /* context changes */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_TEXT: | case NC_TEXT: | ||||
| /* check if active text was changed, no need to redraw if text isn't active | /* check if active text was changed, no need to redraw if text isn't active | ||||
| * (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 */ | ||||
| ▲ Show 20 Lines • Show All 370 Lines • Show Last 20 Lines | |||||