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:
authorJulian Eisel <eiseljulian@gmail.com>2015-08-02 00:55:33 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-08-02 00:59:39 +0300
commit2ec0d53034aff2725d09a911577bbc013b6c06e8 (patch)
tree2a14cd2b2b96308dedec2f5bf707d15cd3491134 /source/blender/editors/animation/anim_ops.c
parenta3c5de3e3ca82d8ad5a28029f3ee9207929318a1 (diff)
Fix VSE not able to playback after scrubbing (and a couple of crashes)
After scrubbing, Blender kept thinking an animation is played (see animation "Play" button), even after mouse release. This resulted in a couple of crashes, e.g. by pressing Alt+a and then Esc. (Also minor cleanup)
Diffstat (limited to 'source/blender/editors/animation/anim_ops.c')
-rw-r--r--source/blender/editors/animation/anim_ops.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 20d1dbe5751..835a8f86cd3 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -148,24 +148,34 @@ static void change_frame_seq_preview_begin(bContext *C, const wmEvent *event)
{
ScrArea *sa = CTX_wm_area(C);
if (sa && sa->spacetype == SPACE_SEQ) {
- wmWindow *win = CTX_wm_window(C);
+ 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 (win->screen)
- win->screen->scrubbing = true;
+ if (screen)
+ screen->scrubbing = true;
}
}
+
static void change_frame_seq_preview_end(bContext *C)
{
+ bScreen *screen = CTX_wm_screen(C);
+ bool notify = false;
+
+ if (screen->scrubbing) {
+ screen->scrubbing = false;
+ notify = true;
+ }
+
if (ED_sequencer_special_preview_get() != NULL) {
- wmWindow *win = CTX_wm_window(C);
- Scene *scene = CTX_data_scene(C);
ED_sequencer_special_preview_clear();
+ notify = true;
+ }
+
+ if (notify) {
+ Scene *scene = CTX_data_scene(C);
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
- if (win->screen)
- win->screen->scrubbing = false;
}
}