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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-07 12:33:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-07 12:34:10 +0300
commit219e2f976d077c16c28d72a2f6763c01230c5bf8 (patch)
treeba40e7f79947dd11cae4a08ed813f920c00fbfd7 /source/blender/editors/space_file
parente52e0c83d717b46afcce36b23e3f6b32f5cb535b (diff)
Tool System: use set/add/subtract for all box select operators
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_ops.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index e1a90584003..482774c8131 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -42,6 +42,7 @@
#include "ED_screen.h"
#include "ED_fileselect.h"
+#include "ED_select_utils.h"
#include "UI_interface.h"
@@ -424,12 +425,12 @@ static int file_box_select_exec(bContext *C, wmOperator *op)
SpaceFile *sfile = CTX_wm_space_file(C);
rcti rect;
FileSelect ret;
- const bool select = !RNA_boolean_get(op->ptr, "deselect");
- const bool extend = RNA_boolean_get(op->ptr, "extend");
WM_operator_properties_border_to_rcti(op, &rect);
- if (!extend) {
+ const eSelectOp sel_op = RNA_enum_get(op->ptr, "mode");
+ const bool select = (sel_op != SEL_OP_SUB);
+ if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
file_deselect_all(sfile, FILE_SEL_SELECTED);
}
@@ -465,7 +466,8 @@ void FILE_OT_select_box(wmOperatorType *ot)
ot->cancel = WM_gesture_box_cancel;
/* properties */
- WM_operator_properties_gesture_box_select(ot);
+ WM_operator_properties_gesture_box(ot);
+ WM_operator_properties_select_operation_simple(ot);
}
static int file_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)