Fix T45464: Blender Sequencer "Select Strips to the Left" produces opposite behavior...
authorBastien Montagne <montagne29@wanadoo.fr>
Fri, 17 Jul 2015 16:31:48 +0000 (18:31 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Fri, 17 Jul 2015 16:32:59 +0000 (18:32 +0200)
Logic was just broken for the LEFT case here.

Also cleaned up and made behavior more consistant between strips and markers.

source/blender/editors/space_sequencer/sequencer_select.c

index c9fdb4ac5f5b325ee6d4d81d69600cfe288d44db..2100c97079eb7556bc0dcccc3c6cdd14c13bf9f0 100644 (file)
@@ -358,36 +358,32 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
                                x = UI_view2d_region_to_view_x(v2d, event->mval[0]);
                                break;
                        case SEQ_SELECT_LR_LEFT:
+                               x = CFRA - 1.0f;
+                               break;
                        case SEQ_SELECT_LR_RIGHT:
+                       default:
                                x = CFRA;
                                break;
                }
                
                SEQP_BEGIN (ed, seq)
                {
-                       if (x < CFRA) {
-                               if (seq->enddisp <= CFRA) {
-                                       seq->flag |= SELECT;
-                                       recurs_sel_seq(seq);
-                               }
-                       }
-                       else {
-                               if (seq->startdisp >= CFRA) {
-                                       seq->flag |= SELECT;
-                                       recurs_sel_seq(seq);
-                               }
+                       if (((x <  CFRA) && (seq->enddisp   <= CFRA)) ||
+                           ((x >= CFRA) && (seq->startdisp >= CFRA)))
+                       {
+                               seq->flag |= SELECT;
+                               recurs_sel_seq(seq);
                        }
                }
                SEQ_END
-               
                {
                        SpaceSeq *sseq = CTX_wm_space_seq(C);
                        if (sseq && sseq->flag & SEQ_MARKER_TRANS) {
                                TimeMarker *tmarker;
 
                                for (tmarker = scene->markers.first; tmarker; tmarker = tmarker->next) {
-                                       if (((x <  CFRA) && tmarker->frame <  CFRA) ||
-                                           ((x >= CFRA) && tmarker->frame >= CFRA))
+                                       if (((x <  CFRA) && (tmarker->frame <= CFRA)) ||
+                                           ((x >= CFRA) && (tmarker->frame >= CFRA)))
                                        {
                                                tmarker->flag |= SELECT;
                                        }