diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 09:27:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 09:27:31 +0400 |
commit | 170716ca533b250ffa9ae031096bbef9ad7c2976 (patch) | |
tree | 3c20404f22073aab79dc6ff5e9e08cd2f841d951 /source/blender/editors/space_time/space_time.c | |
parent | 984d2e42e4a81c1f92dc405ce1b265842bc94b9a (diff) |
use BKE_area_find_region_type in place of inline loops (no functional changes).
Diffstat (limited to 'source/blender/editors/space_time/space_time.c')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index ca9d786c4de..e55fbe11e52 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -367,15 +367,11 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar static void time_refresh(const bContext *UNUSED(C), ScrArea *sa) { - SpaceTime *stime = (SpaceTime *)sa->spacedata.first; - ARegion *ar; - /* find the main timeline region and refresh cache display*/ - for (ar= sa->regionbase.first; ar; ar= ar->next) { - if (ar->regiontype==RGN_TYPE_WINDOW) { - time_cache_refresh(stime); - break; - } + ARegion *ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + if(ar) { + SpaceTime *stime = (SpaceTime *)sa->spacedata.first; + time_cache_refresh(stime); } } |