Fix scrubbing only treated as animation for sequencer

Intent was to act as animation everywhere
This commit is contained in:
Antonis Ryakiotakis 2015-08-07 15:39:32 +02:00
parent 20bd253809
commit 9becee445e
3 changed files with 12 additions and 12 deletions

View File

@ -147,15 +147,15 @@ static int frame_from_event(bContext *C, const wmEvent *event)
static void change_frame_seq_preview_begin(bContext *C, const wmEvent *event)
{
ScrArea *sa = CTX_wm_area(C);
bScreen *screen = CTX_wm_screen(C);
if (sa && sa->spacetype == SPACE_SEQ) {
bScreen *screen = CTX_wm_screen(C);
SpaceSeq *sseq = sa->spacedata.first;
if (ED_space_sequencer_check_show_strip(sseq)) {
ED_sequencer_special_preview_set(C, event->mval);
}
if (screen)
screen->scrubbing = true;
}
if (screen)
screen->scrubbing = true;
}
static void change_frame_seq_preview_end(bContext *C)

View File

@ -139,7 +139,7 @@ static void graphview_cursor_setprops(bContext *C, wmOperator *op, const wmEvent
/* Modal Operator init */
static int graphview_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
wmWindow *win = CTX_wm_window(C);
bScreen *screen = CTX_wm_screen(C);
/* Change to frame that mouse is over before adding modal handler,
* as user could click on a single frame (jump to frame) as well as
* click-dragging over a range (modal scrubbing).
@ -149,8 +149,8 @@ static int graphview_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *e
/* apply these changes first */
graphview_cursor_apply(C, op);
if (win->screen)
win->screen->scrubbing = true;
if (screen)
screen->scrubbing = true;
/* add temp handler */
WM_event_add_modal_handler(C, op);
@ -160,12 +160,12 @@ static int graphview_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *e
/* Modal event handling of cursor changing */
static int graphview_cursor_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
wmWindow *win = CTX_wm_window(C);
bScreen *screen = CTX_wm_screen(C);
/* execute the events */
switch (event->type) {
case ESCKEY:
if (win->screen)
win->screen->scrubbing = false;
if (screen)
screen->scrubbing = false;
return OPERATOR_FINISHED;
case MOUSEMOVE:
@ -181,8 +181,8 @@ static int graphview_cursor_modal(bContext *C, wmOperator *op, const wmEvent *ev
* the modal op) doesn't work for some reason
*/
if (event->val == KM_RELEASE) {
if (win->screen)
win->screen->scrubbing = false;
if (screen)
screen->scrubbing = false;
return OPERATOR_FINISHED;
}
break;

View File

@ -3877,7 +3877,7 @@ static void view3d_main_area_draw_info(const bContext *C, Scene *scene,
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
wmWindowManager *wm = CTX_wm_manager(C);
if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) {
if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) {
ED_scene_draw_fps(scene, &rect);
}
else if (U.uiflag & USER_SHOW_VIEWPORTNAME) {