Fix (unreported) bad handling of undo for some IDTemplates operations.

This commit is contained in:
Bastien Montagne 2020-07-13 17:02:58 +02:00
parent 91e67c7bda
commit fcc91faf3f
1 changed files with 2 additions and 1 deletions

View File

@ -569,6 +569,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
/* Assign new pointer, takes care of updates/notifiers */
RNA_id_pointer_create(override_id, &idptr);
}
undo_push_label = "Make Library Override";
}
}
else {
@ -577,11 +578,11 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
/* reassign to get get proper updates/notifiers */
idptr = RNA_property_pointer_get(&template_ui->ptr, template_ui->prop);
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);
undo_push_label = "Make Local";
}
break;
case UI_ID_OVERRIDE: