Skip to content

context menu items not being added #141

@rsa17826

Description

@rsa17826

ERROR: res://addons/mod_loader/resources/mod_manifest.gd:116 - Invalid access to property or key 'ml_options' on a base object of type 'Node (mod_loader_store.gd)'.
ModTool: Loaded manifest from res://mods-unpacked/rssaromeo-test/manifest.json
WARNING: editor/editor_file_system.cpp:1376 - UID duplicate detected between res://mods-unpacked/rssaromeo-test/mod_main.gd and res://addons/mod_tool/templates/default/mod_main.gd.
ERROR: core/object/object.cpp:1300 - Error calling from signal 'about_to_popup' to callable: 'Control(file_system_context_actions.gd)::_on_file_list_context_actions_about_to_popup': Cannot convert argument 2 from Object to Object.

at

func _on_file_list_context_actions_about_to_popup(context_menu: PopupMenu, list: ItemList) -> void:
  if not list.get_selected_items().size() > 0:		# Empty space was clicked
    return

  var file_paths := []
  for item_index in list.get_selected_items():
    var file_path = list.get_item_metadata(item_index)
    if file_path is String:
      file_paths.append(file_path)

  add_custom_context_actions(context_menu, file_paths)

list should be a Tree not an ItemList as that is what is passed in to this function.

godot version v4.5.beta1.official [46c495ca2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions