File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments