diff options
author | Bastien Montagne <bastien@blender.org> | 2020-07-13 18:43:22 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-07-13 18:43:22 +0300 |
commit | 8dd2386a6834e13de69c7e4c4abc58f0d9cdeedb (patch) | |
tree | bd500806ef676b7e37f4acbcbc5d690598cdebd4 | |
parent | fcc91faf3f1a362b5e20029e61e0d1407d7befc5 (diff) |
IDTemplate: Minor tweak to 'make local/override' code.
Only update pointer of the template if we actually changed it...
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index bd79dc9f986..7502652c262 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -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: |