- modal keymap for border select
[blender-staging.git] / source / blender / editors / space_sequencer / sequencer_select.c
index fc33dc139b6c22c20f240da02c522ff76888bf1f..381d9241094cd3f42bc0c7259cbc1866ea98412f 100644 (file)
@@ -793,13 +793,12 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
        Sequence *seq;
        rcti rect;
        rctf rectf, rq;
-       int val;
+       short selecting = (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT);
        short mval[2];
 
        if(ed==NULL)
                return OPERATOR_CANCELLED;
 
-       val= RNA_int_get(op->ptr, "event_type");
        rect.xmin= RNA_int_get(op->ptr, "xmin");
        rect.ymin= RNA_int_get(op->ptr, "ymin");
        rect.xmax= RNA_int_get(op->ptr, "xmax");
@@ -816,7 +815,7 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
                seq_rectf(seq, &rq);
                
                if(BLI_isect_rctf(&rq, &rectf, 0)) {
-                       if(val==LEFTMOUSE)      seq->flag |= SELECT;
+                       if(selecting)           seq->flag |= SELECT;
                        else                            seq->flag &= SEQ_DESEL;
                        recurs_sel_seq(seq);
                }
@@ -845,9 +844,5 @@ void SEQUENCER_OT_select_border(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* rna */
-       RNA_def_int(ot->srna, "event_type", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
+       WM_operator_properties_gesture_border(ot, FALSE);
 }