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:
authorjulianeisel <julian_eisel@web.de>2015-01-04 04:36:42 +0300
committerjulianeisel <julian_eisel@web.de>2015-01-04 04:36:42 +0300
commit555c1d6a635ae2b907a7e6331827d19dd425d879 (patch)
tree273352b1806cc9955e5ba684dd226025439c904c /source/blender/editors/space_file/file_ops.c
parentdcc5997527df32dfbb71874e3099b3790d8e9b4a (diff)
Fix T43114: File Browser - don't highlight '..' while using border select
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 5798529583f..780ff511b4c 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -259,9 +259,25 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent *
sel = file_selection_get(C, &rect, 0);
if ( (sel.first != params->sel_first) || (sel.last != params->sel_last) ) {
+ int idx;
+
file_deselect_all(sfile, HILITED_FILE);
filelist_select(sfile->files, &sel, FILE_SEL_ADD, HILITED_FILE, CHECK_ALL);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_PARAMS, NULL);
+
+ /* dont highlight readonly file (".." or ".") on border select */
+ for (idx = sel.last; idx >= 0; idx--) {
+ struct direntry *file = filelist_file(sfile->files, idx);
+
+ if (STREQ(file->relname, "..") || STREQ(file->relname, ".")) {
+ file->selflag &= ~HILITED_FILE;
+ }
+
+ /* active_file gets highlighted as well - make sure it is no readonly file */
+ if (sel.last == idx) {
+ params->active_file = idx;
+ }
+ }
}
params->sel_first = sel.first; params->sel_last = sel.last;