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:
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index d6bab41f719..69c192b077b 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -273,13 +273,20 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
ARegion *ar= CTX_wm_region(C);
rcti rect;
FileSelect ret;
-
+ int extend= RNA_boolean_get(op->ptr, "extend");
short select= (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT);
+
rect.xmin= RNA_int_get(op->ptr, "xmin");
rect.ymin= RNA_int_get(op->ptr, "ymin");
rect.xmax= RNA_int_get(op->ptr, "xmax");
rect.ymax= RNA_int_get(op->ptr, "ymax");
+ if(!extend) {
+ SpaceFile *sfile= CTX_wm_space_file(C);
+
+ file_deselect_all(sfile, SELECTED_FILE);
+ }
+
BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect);
ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, 0);
@@ -306,7 +313,7 @@ void FILE_OT_select_border(wmOperatorType *ot)
ot->cancel= WM_border_select_cancel;
/* rna */
- WM_operator_properties_gesture_border(ot, 0);
+ WM_operator_properties_gesture_border(ot, 1);
}
static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)