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:
authorTon Roosendaal <ton@blender.org>2011-03-11 20:01:29 +0300
committerTon Roosendaal <ton@blender.org>2011-03-11 20:01:29 +0300
commit719bf206b4b79c06de966b6b4a2c3a06a04c713c (patch)
treea42a24db37e70dd90c6fe2850c4f9718b0b01e42
parent01b547f9931970050e9e12e26a3ab61cfef54422 (diff)
Bugfix #26444
Double click in File Window also loaded a file on double-click at a directory. The operator for it was using a Macro mistakingly here. On any double click, it selected the item first and then executed load. By default, any double click action has to rely on the first click being properly handled before. Simply removing this macro, and assign the "exec operator" to the double-click event works as expected. A double click on a directory then just shows the dir (because the exec requires an 'active' file item).
-rw-r--r--source/blender/editors/space_file/file_ops.c10
-rw-r--r--source/blender/editors/space_file/space_file.c3
2 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index bf30db97748..28f5423f3a6 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1337,12 +1337,8 @@ void FILE_OT_delete(struct wmOperatorType *ot)
void ED_operatormacros_file(void)
{
- wmOperatorType *ot;
- wmOperatorTypeMacro *otmacro;
+// wmOperatorType *ot;
+// wmOperatorTypeMacro *otmacro;
- ot= WM_operatortype_append_macro("FILE_OT_select_execute", "Select and Execute", OPTYPE_UNDO|OPTYPE_REGISTER);
- WM_operatortype_macro_define(ot, "FILE_OT_select");
- otmacro= WM_operatortype_macro_define(ot, "FILE_OT_execute");
- RNA_boolean_set(otmacro->ptr, "need_active", 1);
-
+ /* future macros */
}
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 0c95bf482f2..d4240a9ad53 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -412,7 +412,8 @@ static void file_keymap(struct wmKeyConfig *keyconf)
/* keys for main area */
keymap= WM_keymap_find(keyconf, "File Browser Main", SPACE_FILE, 0);
- WM_keymap_add_item(keymap, "FILE_OT_select_execute", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
+ kmi= WM_keymap_add_item(keymap, "FILE_OT_execute", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
+ RNA_boolean_set(kmi->ptr, "need_active", 1);
WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, 0, 0);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);