Skip to content

Commit c8d76c1

Browse files
committed
Merge pull request #97185 from KoBeWi/ID_war
Fix FileSystemDock's EditorContextMenuPlugins
2 parents d788205 + 5901a7a commit c8d76c1

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
@@ -2662,8 +2662,11 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
26622662
} break;
26632663

26642664
default: {
2665-
// Resource conversion commands:
2666-
if (p_option >= CONVERT_BASE_ID) {
2665+
if (p_option >= EditorContextMenuPlugin::BASE_ID) {
2666+
if (!EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM, p_option, p_selected)) {
2667+
EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM_CREATE, p_option, p_selected);
2668+
}
2669+
} else if (p_option >= CONVERT_BASE_ID) {
26672670
selected_conversion_id = p_option - CONVERT_BASE_ID;
26682671
ERR_FAIL_INDEX(selected_conversion_id, (int)cached_valid_conversion_targets.size());
26692672

@@ -2681,10 +2684,6 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
26812684
}
26822685
conversion_id++;
26832686
}
2684-
} else {
2685-
if (!EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM, p_option, p_selected)) {
2686-
EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM_CREATE, p_option, p_selected);
2687-
}
26882687
}
26892688
break;
26902689
}

0 commit comments

Comments
 (0)