Fix incorrect poll function used for file path dropping

The operator to drop file paths into the File Browser was just checking
if there's an active window. This wasn't really an issue since the
operator was only used as drop-operator for the File Browser. But the
operator would show up in the operator search. Plus, for asset browsing,
we'll also have to check the file browsing mode, so the more specific
poll function will be needed.
This commit is contained in:
Julian Eisel 2021-07-30 18:55:03 +02:00
parent 9ac782b823
commit f7836019b3
1 changed files with 1 additions and 1 deletions

View File

@ -2241,7 +2241,7 @@ void FILE_OT_filepath_drop(wmOperatorType *ot)
ot->idname = "FILE_OT_filepath_drop";
ot->exec = filepath_drop_exec;
ot->poll = WM_operator_winactive;
ot->poll = ED_operator_file_active;
RNA_def_string_file_path(ot->srna, "filepath", "Path", FILE_MAX, "", "");
}