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_time')
-rw-r--r--source/blender/editors/space_time/space_time.c3
-rw-r--r--source/blender/editors/space_time/time_ops.c10
2 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index e89a64faf94..5cadd521b66 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -85,7 +85,8 @@ static void time_draw_cfra_time(const bContext *C, SpaceTime *stime, ARegion *ar
static void time_draw_sfra_efra(const bContext *C, SpaceTime *stime, ARegion *ar)
{
- View2D *v2d= UI_view2d_fromcontext(C);
+ View2D *v2d= UI_view2d_fromcontext(C);
+ //Scene *scene= CTX_data_scene(C);
/* draw darkened area outside of active timeline
* frame range used is preview range or scene range */
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c
index 30b0e808e05..e8704457c00 100644
--- a/source/blender/editors/space_time/time_ops.c
+++ b/source/blender/editors/space_time/time_ops.c
@@ -181,16 +181,18 @@ void ED_TIME_OT_change_frame(wmOperatorType *ot)
static int toggle_time_exec(bContext *C, wmOperator *op)
{
- SpaceTime *stime;
+ SpaceTime *stime= (SpaceTime *)CTX_wm_space_data(C);
+ ScrArea *curarea= CTX_wm_area(C);
- if (ELEM(NULL, CTX_wm_area(C), CTX_wm_space_data(C)))
+ if (ELEM(NULL, curarea, stime))
return OPERATOR_CANCELLED;
/* simply toggle draw frames flag for now */
- // XXX in past, this displayed menu to choose... (for later!)
- stime= (SpaceTime*)CTX_wm_space_data(C);
+ // in past, this asked user to choose in a menu beforehand, but that is clumsy
stime->flag ^= TIME_DRAWFRAMES;
+ ED_area_tag_redraw(curarea);
+
return OPERATOR_FINISHED;
}