[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51162] trunk/blender/source/blender/ editors/space_file/file_ops.c: fix [#32799] right click select in filebrowser breaks opening folders

Campbell Barton ideasman42 at gmail.com
Mon Oct 8 05:33:07 CEST 2012


Revision: 51162
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51162
Author:   campbellbarton
Date:     2012-10-08 03:33:02 +0000 (Mon, 08 Oct 2012)
Log Message:
-----------
fix [#32799] right click select in filebrowser breaks opening folders
own regression since 2.63,

The path length for FILE_OT_select_bookmark was too short as well (256 --> FILE_MAXDIR).

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

Modified: trunk/blender/source/blender/editors/space_file/file_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_ops.c	2012-10-08 03:28:11 UTC (rev 51161)
+++ trunk/blender/source/blender/editors/space_file/file_ops.c	2012-10-08 03:33:02 UTC (rev 51162)
@@ -307,7 +307,7 @@
 	ot->poll = ED_operator_file_active;
 	ot->cancel = WM_border_select_cancel;
 
-	/* rna */
+	/* properties */
 	WM_operator_properties_gesture_border(ot, 1);
 }
 
@@ -347,6 +347,8 @@
 
 void FILE_OT_select(wmOperatorType *ot)
 {
+	PropertyRNA *prop;
+
 	/* identifiers */
 	ot->name = "Activate/Select File";
 	ot->description = "Activate/select file";
@@ -356,10 +358,13 @@
 	ot->invoke = file_select_invoke;
 	ot->poll = ED_operator_file_active;
 
-	/* rna */
-	RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
-	RNA_def_boolean(ot->srna, "fill", FALSE, "Fill", "Select everything beginning with the last selection");
-	RNA_def_boolean(ot->srna, "open", TRUE, "Open", "Open a directory when selecting it");
+	/* properties */
+	prop = RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+	prop = RNA_def_boolean(ot->srna, "fill", FALSE, "Fill", "Select everything beginning with the last selection");
+	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+	prop = RNA_def_boolean(ot->srna, "open", TRUE, "Open", "Open a directory when selecting it");
+	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
 static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op))
@@ -404,9 +409,7 @@
 	ot->exec = file_select_all_exec;
 	ot->poll = ED_operator_file_active;
 
-	/* rna */
-
-	
+	/* properties */
 }
 
 /* ---------- BOOKMARKS ----------- */
@@ -432,6 +435,8 @@
 
 void FILE_OT_select_bookmark(wmOperatorType *ot)
 {
+	PropertyRNA *prop;
+
 	/* identifiers */
 	ot->name = "Select Directory";
 	ot->description = "Select a bookmarked directory";
@@ -441,7 +446,9 @@
 	ot->exec = bookmark_select_exec;
 	ot->poll = ED_operator_file_active;
 
-	RNA_def_string(ot->srna, "dir", "", 256, "Dir", "");
+	/* properties */
+	prop = RNA_def_string(ot->srna, "dir", "", FILE_MAXDIR, "Dir", "");
+	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
 static int bookmark_add_exec(bContext *C, wmOperator *UNUSED(op))
@@ -498,6 +505,8 @@
 
 void FILE_OT_delete_bookmark(wmOperatorType *ot)
 {
+	PropertyRNA *prop;
+
 	/* identifiers */
 	ot->name = "Delete Bookmark";
 	ot->description = "Delete selected bookmark";
@@ -507,7 +516,9 @@
 	ot->exec = bookmark_delete_exec;
 	ot->poll = ED_operator_file_active;
 
-	RNA_def_int(ot->srna, "index", -1, -1, 20000, "Index", "", -1, 20000);
+	/* properties */
+	prop = RNA_def_int(ot->srna, "index", -1, -1, 20000, "Index", "", -1, 20000);
+	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
 static int reset_recent_exec(bContext *C, wmOperator *UNUSED(op))
@@ -819,7 +830,8 @@
 	/* api callbacks */
 	ot->exec = file_exec;
 	ot->poll = file_operator_poll; 
-	
+
+	/* properties */
 	prop = RNA_def_boolean(ot->srna, "need_active", 0, "Need Active",
 	                       "Only execute if there's an active selected file in the file list");
 	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
@@ -1123,6 +1135,8 @@
 
 void FILE_OT_directory_new(struct wmOperatorType *ot)
 {
+	PropertyRNA *prop;
+
 	/* identifiers */
 	ot->name = "Create New Directory";
 	ot->description = "Create a new directory";
@@ -1133,7 +1147,8 @@
 	ot->exec = file_directory_new_exec;
 	ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
 
-	RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Name of new directory");
+	prop = RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Name of new directory");
+	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 
 }
 




More information about the Bf-blender-cvs mailing list