Revision: 35473
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35473
Author:   ton
Date:     2011-03-11 17:01:29 +0000 (Fri, 11 Mar 2011)
Log Message:
-----------
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).

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_file/file_ops.c
    trunk/blender/source/blender/editors/space_file/space_file.c

Modified: trunk/blender/source/blender/editors/space_file/file_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_ops.c  2011-03-11 
11:15:35 UTC (rev 35472)
+++ trunk/blender/source/blender/editors/space_file/file_ops.c  2011-03-11 
17:01:29 UTC (rev 35473)
@@ -1337,12 +1337,8 @@
 
 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 */
 }

Modified: trunk/blender/source/blender/editors/space_file/space_file.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/space_file.c        
2011-03-11 11:15:35 UTC (rev 35472)
+++ trunk/blender/source/blender/editors/space_file/space_file.c        
2011-03-11 17:01:29 UTC (rev 35473)
@@ -412,7 +412,8 @@
 
        /* 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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to