diff options
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index f68d329329f..6d7365fa136 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1309,6 +1309,18 @@ static int bookmark_move_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +static bool file_bookmark_move_poll(bContext *C) +{ + SpaceFile *sfile = CTX_wm_space_file(C); + + /* Bookmarks are for file browsing only (not asset browsing). */ + if (!ED_operator_file_browsing_active(C)) { + return false; + } + + return sfile->bookmarknr != -1; +} + void FILE_OT_bookmark_move(wmOperatorType *ot) { static const EnumPropertyItem slot_move[] = { @@ -1325,8 +1337,7 @@ void FILE_OT_bookmark_move(wmOperatorType *ot) /* api callbacks */ ot->exec = bookmark_move_exec; - /* Bookmarks are for file browsing only (not asset browsing). */ - ot->poll = ED_operator_file_browsing_active; + ot->poll = file_bookmark_move_poll; /* flags */ ot->flag = OPTYPE_REGISTER; /* No undo! */ |