From 31b38a6736af734d66f09caf6298d94f138b55f9 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 17 Oct 2013 12:53:37 +0000 Subject: Fix #37122: Text Editor: New Open-Shortcut different from Text > Open Text Block Seems no user counter tricks are needed from r23598. Also, r33453 is obviously wrong, because new ID's user counter is 1, and could not exceed this value. --- source/blender/editors/space_text/text_ops.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source') diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index c078e612d68..4f53d033029 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -174,12 +174,6 @@ static int text_new_exec(bContext *C, wmOperator *UNUSED(op)) uiIDContextProperty(C, &ptr, &prop); if (prop) { - /* when creating new ID blocks, use is already 1, but RNA - * pointer se also increases user, so this compensates it */ - /* doesnt always seem to happen... (ton) */ - if (text->id.us > 1) - text->id.us--; - RNA_id_pointer_create(&text->id, &idptr); RNA_property_pointer_set(&ptr, prop, idptr); RNA_property_update(C, &ptr, prop); @@ -252,10 +246,6 @@ static int text_open_exec(bContext *C, wmOperator *op) pprop = op->customdata; if (pprop->prop) { - /* when creating new ID blocks, use is already 1, but RNA - * pointer se also increases user, so this compensates it */ - text->id.us--; - RNA_id_pointer_create(&text->id, &idptr); RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr); RNA_property_update(C, &pprop->ptr, pprop->prop); -- cgit v1.2.3