Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_buttons/space_buttons.c
| Show First 20 Lines • Show All 396 Lines • ▼ Show 20 Lines | static void property_search_all_tabs(const bContext *C, | ||||
| const short *context_tabs_array, | const short *context_tabs_array, | ||||
| const int tabs_len) | const int tabs_len) | ||||
| { | { | ||||
| /* Use local copies of the area and duplicate the region as a mainly-paranoid protection | /* Use local copies of the area and duplicate the region as a mainly-paranoid protection | ||||
| * against changing any of the space / region data while running the search. */ | * against changing any of the space / region data while running the search. */ | ||||
| ScrArea *area_original = CTX_wm_area(C); | ScrArea *area_original = CTX_wm_area(C); | ||||
| ScrArea area_copy = *area_original; | ScrArea area_copy = *area_original; | ||||
| ARegion *region_copy = BKE_area_region_copy(area_copy.type, region_original); | ARegion *region_copy = BKE_area_region_copy(area_copy.type, region_original); | ||||
| /* Set the region visible field. Otherwise some layout code thinks we're drawing in a popup. | |||||
| * This likely isn't necessary, but it's nice to emulate a "real" region where possible. */ | |||||
| region_copy->visible = true; | |||||
| CTX_wm_area_set((bContext *)C, &area_copy); | CTX_wm_area_set((bContext *)C, &area_copy); | ||||
| CTX_wm_region_set((bContext *)C, region_copy); | CTX_wm_region_set((bContext *)C, region_copy); | ||||
| SpaceProperties sbuts_copy = *sbuts; | SpaceProperties sbuts_copy = *sbuts; | ||||
| sbuts_copy.path = NULL; | sbuts_copy.path = NULL; | ||||
| sbuts_copy.texuser = NULL; | sbuts_copy.texuser = NULL; | ||||
| sbuts_copy.runtime = MEM_dupallocN(sbuts->runtime); | sbuts_copy.runtime = MEM_dupallocN(sbuts->runtime); | ||||
| sbuts_copy.runtime->tab_search_results = NULL; | sbuts_copy.runtime->tab_search_results = NULL; | ||||
| ▲ Show 20 Lines • Show All 584 Lines • Show Last 20 Lines | |||||