godotengine / godotengine/godot

BaseButton's shortcut's Events in Inspector offers InputEventShortcut, but errors upon selecting

Open
#116,268 1 comment 0 reactions 0 assignees View on GitHub
bug topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.6.stable.official [89cea1439]

### System information

N/A

### Issue description

When trying to modify the `BaseButton`'s `shortcut` property in the Inspector dock, the Editor dropdown allows selecting a new `InputEventShortcut`, but then prints this error if you select that:
> ERROR: Cannot set a shortcut event to an instance of InputEventShortcut.

Image

grepping through the source seems to indicate that the error is intentional:
https://github.com/godotengine/godot/blob/bf95b62586e31b8a3503f5903d7764d7c52bf2ab/core/input/shortcut.cpp#L34-L37

But I imagine we shouldn't be offering that Event type as an option in the Inpsector if it's not allowed there?

### Steps to reproduce

1. Create a new scene with a `Button`
2. With that Button selected, go to the Inspector and add a new Shortcut
3. Add a new Event to that Shortcut
4. Try to select a new `InputEventShortcut` as the Event

### Minimal reproduction project (MRP)

n/a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.