Merge pull request #104485 from EricEzaM/2025-shortcut-context-improvements

Fix EditorProperty shortcuts being global and unintentionally triggering
This commit is contained in:
Thaddeus Crews 2025-04-01 08:01:15 -05:00
commit fd27e4f795
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -579,6 +579,12 @@ void EditorProperty::_notification(int p_what) {
}
} break;
case NOTIFICATION_ENTER_TREE: {
EditorInspector *inspector = get_parent_inspector();
if (inspector) {
inspector = inspector->get_root_inspector();
}
set_shortcut_context(inspector);
if (has_borders) {
get_parent()->connect(SceneStringName(theme_changed), callable_mp(this, &EditorProperty::_update_property_bg));
_update_property_bg();