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>2012-09-13 05:50:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-13 05:50:21 +0400
commit4cb6d5d214529749bbeeb2a63018b2d54ffa3417 (patch)
tree5cd36b8461ffa8b3ccdf74c9d80d6752db67eefe /source/blender/editors/animation/anim_markers.c
parent3e4b353cfa7258a6678252db4d382094782f42f7 (diff)
code cleanup: reduce calls to CTX_ functions inline, add some docs to mask rasterizer.
Diffstat (limited to 'source/blender/editors/animation/anim_markers.c')
-rw-r--r--source/blender/editors/animation/anim_markers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 95adaa01b94..445b684c261 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -1019,6 +1019,7 @@ static void select_timeline_marker_frame(ListBase *markers, int frame, unsigned
static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
{
ListBase *markers = ED_context_get_markers(C);
+ ARegion *ar = CTX_wm_region(C);
View2D *v2d = UI_view2d_fromcontext(C);
float viewx;
int x, y, cfra;
@@ -1026,8 +1027,8 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
if (markers == NULL)
return OPERATOR_PASS_THROUGH;
- x = evt->x - CTX_wm_region(C)->winrct.xmin;
- y = evt->y - CTX_wm_region(C)->winrct.ymin;
+ x = evt->x - ar->winrct.xmin;
+ y = evt->y - ar->winrct.ymin;
UI_view2d_region_to_view(v2d, x, y, &viewx, NULL);