Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-10-17 16:53:37 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-10-17 16:53:37 +0400
commit31b38a6736af734d66f09caf6298d94f138b55f9 (patch)
tree4133378417399d4eee5ab30601ec76015e6469f9 /source
parent47f365419f7903671f1e18ddf9d2ede4ae61e833 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_text/text_ops.c10
1 files changed, 0 insertions, 10 deletions
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);