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
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-07-13 18:43:22 +0300
committerBastien Montagne <bastien@blender.org>2020-07-13 18:43:22 +0300
commit8dd2386a6834e13de69c7e4c4abc58f0d9cdeedb (patch)
treebd500806ef676b7e37f4acbcbc5d690598cdebd4 /source/blender/editors/interface
parentfcc91faf3f1a362b5e20029e61e0d1407d7befc5 (diff)
IDTemplate: Minor tweak to 'make local/override' code.
Only update pointer of the template if we actually changed it...
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_templates.c6
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: