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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-12 00:03:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-12 00:03:41 +0400
commit45e3b0c44e29dd15093dc1d4f738e8b2e7850a0e (patch)
tree6d03323db01e82b469ab2aac4ea311703c24157e /source/blender/windowmanager
parent03b0681fe513c12fda0a377984a1a81afb9fdb8f (diff)
fix for error in last commit - don't overwrite options in the new operator which have been set before the operator runs.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index d97f66a69e6..079833f693f 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -747,19 +747,20 @@ static int wm_operator_init_from_last(wmWindowManager *wm, wmOperator *op)
RNA_PROP_BEGIN(op->ptr, itemptr, iterprop) {
PropertyRNA *prop= itemptr.data;
-
if((RNA_property_flag(prop) & PROP_SKIP_SAVE) == 0) {
- const char *identifier= RNA_property_identifier(prop);
- IDProperty *idp_src= IDP_GetPropertyFromGroup(lastop->properties, identifier);
- if(idp_src) {
- IDProperty *idp_dst = IDP_CopyProperty(idp_src);
-
- /* note - in the future this may need to be done recursively,
- * but for now RNA doesn't access nested operators */
- idp_dst->flag |= IDP_FLAG_GHOST;
-
- IDP_ReplaceInGroup(op->properties, idp_dst);
- change= TRUE;
+ if (!RNA_property_is_set(op->ptr, prop)) { /* don't override a setting already set */
+ const char *identifier= RNA_property_identifier(prop);
+ IDProperty *idp_src= IDP_GetPropertyFromGroup(lastop->properties, identifier);
+ if(idp_src) {
+ IDProperty *idp_dst = IDP_CopyProperty(idp_src);
+
+ /* note - in the future this may need to be done recursively,
+ * but for now RNA doesn't access nested operators */
+ idp_dst->flag |= IDP_FLAG_GHOST;
+
+ IDP_ReplaceInGroup(op->properties, idp_dst);
+ change= TRUE;
+ }
}
}
}