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>2019-07-16 08:53:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-16 08:53:15 +0300
commitd5fa23073634b15873b13c1f242234340685beb7 (patch)
tree5061de62fa3a84bf17f1f719c9f39c001aacfc0f
parentfdf2d8728ab16b370690b6de70125a3f1292f368 (diff)
Fix T67002: Crash redoing an action after ID rename
-rw-r--r--source/blender/editors/interface/interface_handlers.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 0666f0e491e..a7fc0cfec25 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -758,9 +758,17 @@ static void ui_apply_but_undo(uiBut *but)
/* Optionally override undo when undo system doesn't support storing properties. */
if (but->rnapoin.id.data) {
- ID *id = but->rnapoin.id.data;
- if (!ED_undo_is_legacy_compatible_for_property(but->block->evil_C, id)) {
- str = "";
+ /* Exception for renaming ID data, we always need undo pushes in this case,
+ * because undo systems track data by their ID, see: T67002. */
+ extern PropertyRNA rna_ID_name;
+ if (but->rnaprop == &rna_ID_name) {
+ /* pass */
+ }
+ else {
+ ID *id = but->rnapoin.id.data;
+ if (!ED_undo_is_legacy_compatible_for_property(but->block->evil_C, id)) {
+ str = "";
+ }
}
}