Fix #107120: Small fixes to OS File Operations

Small fixes to recent file operations changes. FileOperations enum
starting with zero results in bad behavior with EnumPropertyItem. Typo
fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/107138
This commit is contained in:
Harley Acheson
2023-04-19 19:43:15 +02:00
committed by Harley Acheson
parent 097b9c5a36
commit acb34c718e
2 changed files with 3 additions and 3 deletions

View File

@@ -118,7 +118,7 @@ ENUM_OPERATORS(eFileAttributes, FILE_ATTR_HARDLINK);
* \{ */
typedef enum FileExternalOperation {
FILE_EXTERNAL_OPERATION_OPEN = 0,
FILE_EXTERNAL_OPERATION_OPEN = 1,
FILE_EXTERNAL_OPERATION_FOLDER_OPEN,
/* Following are Windows-only: */
FILE_EXTERNAL_OPERATION_EDIT,

View File

@@ -1832,7 +1832,7 @@ static int file_external_operation_exec(bContext *C, wmOperator *op)
#endif
BKE_reportf(
op->reports, RPT_ERROR, "Failure to perform exernal file operation on \"%s\"", filepath);
op->reports, RPT_ERROR, "Failure to perform external file operation on \"%s\"", filepath);
WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT);
return OPERATOR_CANCELLED;
}
@@ -1869,7 +1869,7 @@ void FILE_OT_external_operation(wmOperatorType *ot)
RNA_def_enum(ot->srna,
"operation",
file_external_operation,
0,
FILE_EXTERNAL_OPERATION_OPEN,
"Operation",
"Operation to perform on the file or path");
}