Skip to content

Commit 5901a7a

Browse files
committed
Fix FileSystemDock's EditorContextMenuPlugins
1 parent 694d3c2 commit 5901a7a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

editor/filesystem_dock.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,8 +2678,11 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
26782678
} break;
26792679

26802680
default: {
2681-
// Resource conversion commands:
2682-
if (p_option >= CONVERT_BASE_ID) {
2681+
if (p_option >= EditorContextMenuPlugin::BASE_ID) {
2682+
if (!EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM, p_option, p_selected)) {
2683+
EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM_CREATE, p_option, p_selected);
2684+
}
2685+
} else if (p_option >= CONVERT_BASE_ID) {
26832686
selected_conversion_id = p_option - CONVERT_BASE_ID;
26842687
ERR_FAIL_INDEX(selected_conversion_id, (int)cached_valid_conversion_targets.size());
26852688

@@ -2697,10 +2700,6 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
26972700
}
26982701
conversion_id++;
26992702
}
2700-
} else {
2701-
if (!EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM, p_option, p_selected)) {
2702-
EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM_CREATE, p_option, p_selected);
2703-
}
27042703
}
27052704
break;
27062705
}

0 commit comments

Comments
 (0)