Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests.
### Fixed
- Fixed Multiple interactions could breaks on Composite Binding. [ISXB-619](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-619)
- Fixed memory leak when the OnScreenStick component was destroyed [ISXB-1070](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1070). Contribution by [LukeUnityDev](https://github.com/LukeUnityDev).
- Fixed Action Maps contextual menu in Action Editor UI that could display unrelated items.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only part I am stumbling over is the "could", but technically that's not wrong.


### Changed
- Renamed editor Resources directories to PackageResources to fix package validation warnings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ internal static class ContextMenu
#region ActionMaps
public static void GetContextMenuForActionMapItem(ActionMapsView mapView, InputActionMapsTreeViewItem treeViewItem, int index)
{
_ = new ContextualMenuManipulator(menuEvent =>
var manipulator = new ContextualMenuManipulator(menuEvent =>
{
//menuEvent.menu.ClearItems();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left over comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ho good catch thanks

// TODO: AddAction should enable m_RenameOnActionAdded
menuEvent.menu.AppendAction(add_Action_String, _ => mapView.Dispatch(Commands.AddAction()));
menuEvent.menu.AppendSeparator();
Expand All @@ -43,6 +44,7 @@ public static void GetContextMenuForActionMapItem(ActionMapsView mapView, InputA
if (CopyPasteHelper.HasPastableClipboardData(typeof(InputActionMap)))
menuEvent.menu.AppendAction(paste_String, _ => mapView.PasteItems(copiedAction));
}) { target = treeViewItem };
treeViewItem.contextualMenuManipulator = manipulator;
}

// Add "Add Action Map" option to empty space under the ListView. Matches with old IMGUI style (ISX-1519).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ internal class InputActionMapsTreeViewItem : VisualElement
private const string kRenameTextField = "rename-text-field";
public event EventCallback<string> EditTextFinished;

internal ContextualMenuManipulator contextualMenuManipulator;

// for testing purposes to know if the item is focused to accept input
internal bool IsFocused { get; private set; } = false;

Expand Down Expand Up @@ -87,6 +89,11 @@ public void Reset()
m_IsEditing = false;
}
EditTextFinished = null;
if (contextualMenuManipulator != null)
{
contextualMenuManipulator.target = null;
contextualMenuManipulator = null;
}
}

public void FocusOnRenameTextField()
Expand Down