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>2018-12-03 10:43:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-03 10:43:33 +0300
commit6bb825e0837e5e090c32567d335fe677e33e5ab0 (patch)
treeef1e6e92ea1e07e0be72a0ae8e9102f7307f7e79
parentbe2e549111b8dd47a9e468fe34dd1396f99b1cb1 (diff)
Fix T54580: Pointer buttons skip undo push
-rw-r--r--source/blender/editors/interface/interface.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 3188829bf31..ab87e1dda55 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3580,8 +3580,16 @@ static uiBut *ui_def_but_rna(
ui_def_but_icon(but, icon, UI_HAS_ICON);
}
- if ((type == UI_BTYPE_MENU) && (but->dt == UI_EMBOSS_PULLDOWN)) {
- but->flag |= UI_BUT_ICON_SUBMENU;
+ if (type == UI_BTYPE_MENU) {
+ if (but->dt == UI_EMBOSS_PULLDOWN) {
+ but->flag |= UI_BUT_ICON_SUBMENU;
+ }
+ }
+ else if (type == UI_BTYPE_SEARCH_MENU) {
+ if (proptype == PROP_POINTER) {
+ /* Search buttons normally don't get undo, see: T54580. */
+ but->flag |= UI_BUT_UNDO;
+ }
}
const char *info;