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:
Diffstat (limited to 'source/blender/editors/space_graph/space_graph.c')
-rw-r--r--source/blender/editors/space_graph/space_graph.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 554d2e36ccf..883b476f372 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -71,17 +71,12 @@ ARegion *graph_has_buttons_region(ScrArea *sa)
{
ARegion *ar, *arnew;
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype==RGN_TYPE_UI)
- return ar;
- }
-
+ ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
+ if(ar) return ar;
+
/* add subdiv level; after main */
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype==RGN_TYPE_WINDOW)
- break;
- }
-
+ ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+
/* is error! */
if (ar==NULL) return NULL;