Fix "Text to Object" creating invisible object

Newly created objects would not become visible until
another action forced a depsgraph update.
This commit is contained in:
Campbell Barton 2021-08-26 12:59:22 +10:00
parent efcac47155
commit 2fb57685e3
Notes: blender-bot 2023-02-14 11:18:07 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
1 changed files with 5 additions and 0 deletions

View File

@ -59,6 +59,7 @@
#include "ED_curve.h"
#include "ED_object.h"
#include "ED_outliner.h"
#include "ED_screen.h"
#include "ED_view3d.h"
@ -704,6 +705,7 @@ static void txt_add_object(bContext *C,
void ED_text_to_object(bContext *C, const Text *text, const bool split_lines)
{
Main *bmain = CTX_data_main(C);
RegionView3D *rv3d = CTX_wm_region_view3d(C);
const TextLine *line;
float offset[3];
@ -742,6 +744,9 @@ void ED_text_to_object(bContext *C, const Text *text, const bool split_lines)
txt_add_object(C, text->lines.first, BLI_listbase_count(&text->lines), offset);
}
DEG_relations_tag_update(bmain);
ED_outliner_select_sync_from_object_tag(C);
}
/** \} */