Skip to content

Commit 4a77265

Browse files
authored
FIX: Don't show action properties view when there's no actions (ISX-1497). (#1819)
* Fix showing action properties view when there's no actions (ISX-1497). * Address feedback: Keep header visible for properties pane. * Access scrollview directly.
1 parent 319f404 commit 4a77265

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ however, it has to be formatted properly to pass verification tests.
3434
- Fixed issue where composite part dropdown manipulates binding path and leaves composite part field unchanged.
3535
- Fixed lingering highlight effect on Save Asset button after clicking.
3636
- Fixed missing name in window title for Input Action assets.
37+
- Fixed showing action properties view when there were no actions.
3738
- Fixed "Listen" functionality for selecting an input sometimes expecting the wrong input type.
3839

3940
## [1.8.0-pre.2] - 2023-11-09

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Resources/InputActionsEditor.uxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<ui:VisualElement name="header" class="body-panel-header">
4343
<ui:Label text="Action Properties" display-tooltip-when-elided="true" name="properties-header-label" />
4444
</ui:VisualElement>
45-
<ui:ScrollView>
45+
<ui:ScrollView name="properties-scrollview">
4646
<ui:Foldout text="Action Properties" name="properties-foldout" class="properties-foldout" />
4747
<ui:Foldout text="Interactions" name="interactions-foldout" class="properties-foldout name-and-parameters-list-view">
4848
<ui:Label text="No interactions have been added." name="no-parameters-added-label" display-tooltip-when-elided="true" class="name-and-parameter-empty-label" style="display: flex;" />

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ public override void RedrawUI(ViewState viewState)
203203
}
204204
RenameNewAction(viewState.newElementID);;
205205
addActionButton.SetEnabled(viewState.actionMapCount > 0);
206+
207+
// Don't want to show action properties if there's no actions.
208+
m_Root.Q<VisualElement>("properties-scrollview").visible = m_ActionsTreeView.GetTreeCount() > 0;
206209
}
207210

208211
private void RenameNewAction(int id)

0 commit comments

Comments
 (0)