IDTemplate: Minor tweak to 'make local/override' code.

Only update pointer of the template if we actually changed it...
This commit is contained in:
Bastien Montagne 2020-07-13 17:43:22 +02:00
parent fcc91faf3f
commit 8dd2386a68
1 changed files with 4 additions and 2 deletions

View File

@ -581,8 +581,10 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
undo_push_label = "Make Local";
}
}
RNA_property_pointer_set(&template_ui->ptr, template_ui->prop, idptr, NULL);
RNA_property_update(C, &template_ui->ptr, template_ui->prop);
if (undo_push_label != NULL) {
RNA_property_pointer_set(&template_ui->ptr, template_ui->prop, idptr, NULL);
RNA_property_update(C, &template_ui->ptr, template_ui->prop);
}
}
break;
case UI_ID_OVERRIDE: