Skip to content

Commit af519e4

Browse files
authored
Merge branch 'develop' into isxb-1127-revert-isxb-746
2 parents 5921275 + de8d662 commit af519e4

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ Due to package verification, the latest version below is the unpublished version
99
however, it has to be formatted properly to pass verification tests.
1010

1111
## [Unreleased] - yyyy-mm-dd
12-
- Reverted changes from 0ddd534d8 (ISXB-746) which introduced a regression [ISXB-1127](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1127)
1312

13+
### Fixed
14+
- Fixed an issue causing the Action context menu to not show on right click when right clicking an action in the Input Action Editor [ISXB-1134](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1134).
15+
- Reverted changes from 0ddd534d8 (ISXB-746) which introduced a regression [ISXB-1127](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1127)
1416

1517
## [1.11.2] - 2024-10-16
1618

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ public ActionMapsView(VisualElement root, StateContainer stateContainer)
6767
m_AddActionMapButton.clicked += AddActionMap;
6868

6969
ContextMenu.GetContextMenuForActionMapsEmptySpace(this, root.Q<VisualElement>("rclick-area-to-add-new-action-map"));
70-
// Only bring up this context menu for the List when it's empty, so we can treat it like right-clicking the empty space:
71-
ContextMenu.GetContextMenuForActionMapsEmptySpace(this, m_ListView, onlyShowIfListIsEmpty: true);
7270
}
7371

7472
void OnDroppedHandler(int mapIndex)

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ public ActionsTreeView(VisualElement root, StateContainer stateContainer)
124124

125125
ContextMenu.GetContextMenuForActionListView(this, m_ActionsTreeView, m_ActionsTreeView.parent);
126126
ContextMenu.GetContextMenuForActionsEmptySpace(this, m_ActionsTreeView, root.Q<VisualElement>("rclick-area-to-add-new-action"));
127-
// Only bring up this context menu for the Tree when it's empty, so we can treat it like right-clicking the empty space:
128-
ContextMenu.GetContextMenuForActionsEmptySpace(this, m_ActionsTreeView, m_ActionsTreeView, onlyShowIfTreeIsEmpty: true);
129127

130128
m_ActionsTreeViewSelectionChangeFilter = new CollectionViewSelectionChangeFilter(m_ActionsTreeView);
131129
m_ActionsTreeViewSelectionChangeFilter.selectedIndicesChanged += (_) =>

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ContextMenu.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,16 @@ public static void GetContextMenuForActionMapItem(ActionMapsView mapView, InputA
4747

4848
// Add "Add Action Map" option to empty space under the ListView. Matches with old IMGUI style (ISX-1519).
4949
// Include Paste here as well, since it makes sense for adding ActionMaps.
50-
public static void GetContextMenuForActionMapsEmptySpace(ActionMapsView mapView, VisualElement element, bool onlyShowIfListIsEmpty = false)
50+
public static void GetContextMenuForActionMapsEmptySpace(ActionMapsView mapView, VisualElement element)
5151
{
5252
_ = new ContextualMenuManipulator(menuEvent =>
5353
{
54-
if (!onlyShowIfListIsEmpty || mapView.GetMapCount() == 0)
55-
{
56-
var copiedAction = CopyPasteHelper.GetCopiedClipboardType() == typeof(InputAction);
57-
if (CopyPasteHelper.HasPastableClipboardData(typeof(InputActionMap)))
58-
menuEvent.menu.AppendAction(paste_String, _ => mapView.PasteItems(copiedAction));
54+
var copiedAction = CopyPasteHelper.GetCopiedClipboardType() == typeof(InputAction);
55+
if (CopyPasteHelper.HasPastableClipboardData(typeof(InputActionMap)))
56+
menuEvent.menu.AppendAction(paste_String, _ => mapView.PasteItems(copiedAction));
5957

60-
menuEvent.menu.AppendSeparator();
61-
menuEvent.menu.AppendAction(add_Action_Map_String, _ => mapView.AddActionMap());
62-
}
58+
menuEvent.menu.AppendSeparator();
59+
menuEvent.menu.AppendAction(add_Action_Map_String, _ => mapView.AddActionMap());
6360
}) { target = element };
6461
}
6562

0 commit comments

Comments
 (0)