[Bf-blender-cvs] [20de6f0] master: Fix T45464: Blender Sequencer "Select Strips to the Left" produces opposite behavior to what is intended.

Bastien Montagne noreply at git.blender.org
Fri Jul 17 18:44:11 CEST 2015


Commit: 20de6f01edd3ac25a606c2f6b1b277b615786790
Author: Bastien Montagne
Date:   Fri Jul 17 18:31:48 2015 +0200
Branches: master
https://developer.blender.org/rB20de6f01edd3ac25a606c2f6b1b277b615786790

Fix T45464: Blender Sequencer "Select Strips to the Left" produces opposite behavior to what is intended.

Logic was just broken for the LEFT case here.

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

===================================================================

M	source/blender/editors/space_sequencer/sequencer_select.c

===================================================================

diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index c9fdb4a..2100c97 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -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;
 					}




More information about the Bf-blender-cvs mailing list