diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-04 13:46:59 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-04 13:46:59 +0300 |
commit | 7277f8973b08f847685a39b9326fc1e2fb9e268b (patch) | |
tree | a2b349fca6180c728a8c6ef8b3fefde956e0c837 /source/blender/editors | |
parent | 44505b38df557a5711703613685a1dec9fc2c3d9 (diff) |
Fix T55260: load Text File with Python from GUI Button results in 0 User
Let's just always ensure user_one when loading text from operator...
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index fe15d9165b7..3c2d3c557f6 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -247,15 +247,15 @@ static int text_open_exec(bContext *C, wmOperator *op) /* hook into UI */ pprop = op->customdata; + id_us_ensure_real(&text->id); + if (pprop->prop) { - id_us_ensure_real(&text->id); RNA_id_pointer_create(&text->id, &idptr); RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr); RNA_property_update(C, &pprop->ptr, pprop->prop); } else if (st) { st->text = text; - id_us_ensure_real(&text->id); st->left = 0; st->top = 0; st->scroll_accum[0] = 0.0f; |