File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ public MainWindow(object data)
4949 protected override void OnKeyDown ( KeyEventArgs e )
5050 {
5151 base . OnKeyDown ( e ) ;
52+
5253 // focus on searchbar if typed a character
5354 if ( e . KeyModifiers is KeyModifiers . None or KeyModifiers . Shift && ( int ) e . Key >= ( int ) Key . A && ( int ) e . Key <= ( int ) Key . Z )
5455 {
@@ -258,11 +259,7 @@ public static void MoveSelectedProjectDown()
258259 Content = "🔍" ,
259260 HorizontalAlignment = HorizontalAlignment . Right ,
260261 } ,
261- } . OnSubmit ( u =>
262- {
263- u . unityProject . OpenProject ( ) ;
264- return ;
265- } ) . SetDock ( Dock . Top ) ,
262+ } . OnSubmit ( static u => u . unityProject . OpenProject ( ) ) . SetDock ( Dock . Top ) ,
266263 new DockPanel
267264 {
268265 Margin = new ( 0 , 10 )
@@ -540,7 +537,7 @@ public static MenuItem[] CreateProjectMenuItems(Func<UnityProject> unityProjectG
540537 new MenuItem
541538 {
542539 Header = "Open" ,
543- HotKey = new ( Key . Enter ) ,
540+ // HotKey = new(Key.Enter),
544541 InputGesture = new ( Key . Enter ) ,
545542 } . OnLayoutUpdate ( ( item ) => item . IsEnabled = unityProjectGetter ( ) ? . unity . HasValue == true )
546543 . OnClick ( OpenSelectedProject ) ,
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class SubmitableListBox : ListBox
2626 protected override void OnPointerReleased ( PointerReleasedEventArgs e )
2727 {
2828 base . OnPointerReleased ( e ) ;
29- if ( e . InitialPressMouseButton == MouseButton . Left )
29+ if ( ! e . Handled && e . InitialPressMouseButton == MouseButton . Left )
3030 {
3131 OnSubmit ? . Invoke ( ) ;
3232 e . Handled = true ;
You can’t perform that action at this time.
0 commit comments