Texts in Outliner dont activate

Texts in Outliner dont activate on selecting (Text Editor did not change
to selected text) which is a bit inconsistent to other ID types.

ref T90862

Maniphest Tasks: T90862

Differential Revision: https://developer.blender.org/D12412
This commit is contained in:
2021-09-06 16:48:39 +02:00
parent ef29bf9023
commit c33a005297
4 changed files with 34 additions and 10 deletions

View File

@@ -1381,16 +1381,7 @@ static int editsource_text_edit(bContext *C,
/* naughty!, find text area to set, not good behavior
* but since this is a developer tool lets allow it - campbell */
ScrArea *area = BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_TEXT, 0);
if (area) {
SpaceText *st = area->spacedata.first;
ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
st->text = text;
if (region) {
ED_text_scroll_to_cursor(st, region, true);
}
}
else {
if (!ED_text_activate_in_screen(C, text)) {
BKE_reportf(op->reports, RPT_INFO, "See '%s' in the text editor", text->id.name + 2);
}