diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-11 13:30:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-11 13:30:30 +0300 |
commit | e2c0197a96dbac2aee519fbfb142441c6aed0963 (patch) | |
tree | 71d45ebf954c14a9906547e05949313169e7eb24 /source/blender/editors/interface/interface_utils.c | |
parent | 2325d15d02e9e0b1fda2586ad5ffbe8364e706f4 (diff) | |
parent | e26f61a2b5071ba4e587dbee62e55ad46519a5d9 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index fd1569ae42e..869be844b05 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -462,6 +462,17 @@ uiButStore *UI_butstore_create(uiBlock *block) void UI_butstore_free(uiBlock *block, uiButStore *bs_handle) { + /* Workaround for button store being moved into new block, + * which then can't use the previous buttons state ('ui_but_update_from_old_block' fails to find a match), + * keeping the active button in the old block holding a reference to the button-state in the new block: see T49034. + * + * Ideally we would manage moving the 'uiButStore', keeping a correct state. + * All things considered this is the most straightforward fix - Campbell. + */ + if (block != bs_handle->block && bs_handle->block != NULL) { + block = bs_handle->block; + } + BLI_freelistN(&bs_handle->items); BLI_remlink(&block->butstore, bs_handle); |