Merge branch 'master' into blender2.8

This commit is contained in:
2017-07-11 12:30:30 +02:00
6 changed files with 121 additions and 37 deletions

View File

@@ -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);