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.
This commit is contained in:
Sergey Sharybin 2013-10-17 12:53:37 +00:00
parent 47f365419f
commit 31b38a6736
1 changed files with 0 additions and 10 deletions

View File

@ -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);