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:
authorCampbell Barton <ideasman42@gmail.com>2011-05-20 09:27:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-20 09:27:31 +0400
commit170716ca533b250ffa9ae031096bbef9ad7c2976 (patch)
tree3c20404f22073aab79dc6ff5e9e08cd2f841d951 /source/blender/editors/space_nla/space_nla.c
parent984d2e42e4a81c1f92dc405ce1b265842bc94b9a (diff)
use BKE_area_find_region_type in place of inline loops (no functional changes).
Diffstat (limited to 'source/blender/editors/space_nla/space_nla.c')
-rw-r--r--source/blender/editors/space_nla/space_nla.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 90f9996e392..f2e0abe1e60 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -69,18 +69,13 @@
ARegion *nla_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;