Cleanup: Add/use utility to remove regions

This commit is contained in:
Julian Eisel
2019-09-20 12:26:06 +02:00
parent 09b728ff3e
commit f5dc979a7e
4 changed files with 14 additions and 9 deletions

View File

@@ -307,11 +307,7 @@ static void file_refresh(const bContext *C, ScrArea *sa)
}
/* If there's _no_ file-operation, ensure we _don't_ have the option region */
else if (sa && (sfile->op == NULL) && (region_tool_props != NULL)) {
/* Remove TOOL_PROPS region. */
ED_region_exit((bContext *)C, region_tool_props);
BKE_area_region_free(sa->type, region_tool_props);
BLI_remlink(&sa->regionbase, region_tool_props);
MEM_freeN(region_tool_props);
ED_region_remove(C, sa, region_tool_props);
}
ED_area_tag_redraw(sa);