Skip to content

Commit a2537bf

Browse files
committed
FIX: Control Schemes dropdown keeps showing a deleted scheme name after the last scheme is removed [UUM-141563]
After deleting the only control scheme in the Input Actions editor, the Control Schemes toolbar dropdown kept displaying the just-deleted scheme's name until the asset was saved or the editor reopened. InputActionsEditorView.SetUpControlSchemesMenu(ViewState) only assigned m_ControlSchemesToolbar.text inside the `viewState.controlSchemes.Any()` branch, so when the collection became empty the toolbar retained its stale text. Add an else branch that resets the text to the "No Control Schemes" default seeded by InputActionsEditor.uxml. Jira: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-141563
1 parent a8bc230 commit a2537bf

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Fixed
1111

12+
- Fixed the Control Schemes dropdown in the Input Actions editor continuing to display a deleted scheme's name after the last control scheme was removed, instead of resetting to "No Control Schemes" until the asset was saved or the editor reopened [UUM-141563](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-141563)
1213
- Fixed the Input Debugger window (Window > Analysis > Input Debugger) being resizable arbitrarily small until its toolbar and device/action/layout tree view were no longer usably visible; it now enforces a minimum window size [UUM-137119](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-137119)
1314
- Fixed the Action Maps list in the Input Actions editor losing keyboard focus after deleting a map, so that Delete, Duplicate, and arrow-key navigation kept working on the auto-selected replacement map without requiring an extra click [UUM-147152](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-147152)
1415

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ private void SetUpControlSchemesMenu(ViewState viewState)
180180
viewState.selectedControlSchemeIndex == i ? DropdownMenuAction.Status.Checked : DropdownMenuAction.Status.Normal));
181181
m_ControlSchemesToolbar.menu.AppendSeparator();
182182
}
183+
else
184+
{
185+
m_ControlSchemesToolbar.text = "No Control Schemes";
186+
}
183187

184188
m_ControlSchemesToolbar.menu.AppendAction("Add Control Scheme...", _ => AddOrUpdateControlScheme(rootElement));
185189
m_ControlSchemesToolbar.menu.AppendAction("Edit Control Scheme...", _ => AddOrUpdateControlScheme(rootElement, true),

0 commit comments

Comments
 (0)