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-11-14 11:53:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-11-14 11:53:26 +0300
commit92953fdefd78e84a74e491d34a86472680bce4c5 (patch)
treeee6b52adee26c316f4e0e0b918a5d3c2596e87cb
parentcdca09422426da39609e576a50edc66cb8429061 (diff)
parent9fff74f1447f8db1e288efe9ebd559370455de9f (diff)
Merge branch 'blender-v2.81-release'
-rw-r--r--source/blender/editors/interface/interface_handlers.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 0b4adb33b1c..806b5789df1 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -764,6 +764,7 @@ static void ui_apply_but_undo(uiBut *but)
if (but->flag & UI_BUT_UNDO) {
const char *str = NULL;
+ bool skip_undo = false;
/* define which string to use for undo */
if (but->type == UI_BTYPE_MENU) {
@@ -792,11 +793,23 @@ static void ui_apply_but_undo(uiBut *but)
else {
ID *id = but->rnapoin.owner_id;
if (!ED_undo_is_legacy_compatible_for_property(but->block->evil_C, id)) {
- str = "";
+ skip_undo = true;
}
}
}
+ if (skip_undo == false) {
+ /* XXX: disable all undo pushes from UI changes from sculpt mode as they cause memfile undo
+ * steps to be written which cause lag: T71434. */
+ if (BKE_paintmode_get_active_from_context(but->block->evil_C) == PAINT_MODE_SCULPT) {
+ skip_undo = true;
+ }
+ }
+
+ if (skip_undo) {
+ str = "";
+ }
+
/* delayed, after all other funcs run, popups are closed, etc */
after = ui_afterfunc_new();
BLI_strncpy(after->undostr, str, sizeof(after->undostr));