@@ -657,12 +657,7 @@ Project GetSelectedProject()
657657 {
658658 return ( Project ) gridRecent . SelectedItem ;
659659 }
660-
661- int GetSelectedProjectIndex ( )
662- {
663- return gridRecent . SelectedIndex ;
664- }
665-
660+
666661 UnityInstallation GetSelectedUnity ( )
667662 {
668663 return ( UnityInstallation ) dataGridUnitys . SelectedItem ;
@@ -755,7 +750,7 @@ void NotifyIcon_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
755750 this . WindowState = WindowState . Normal ;
756751 notifyIcon . Visible = false ;
757752 // NOTE workaround for grid not focused when coming back from minimized window
758- Tools . SetFocusToGrid ( gridRecent , GetSelectedProjectIndex ( ) ) ;
753+ Tools . SetFocusToGrid ( gridRecent , gridRecent . SelectedIndex ) ;
759754 }
760755
761756 private void OnRectangleMouseDown ( object sender , MouseButtonEventArgs e )
@@ -3229,7 +3224,7 @@ private void Button_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs
32293224 // only can do restore here, we dont want accidental maximize (max window not really needed)
32303225 if ( this . WindowState == WindowState . Maximized ) this . WindowState = WindowState . Normal ;
32313226 // NOTE workaround for grid not focused when coming back from minimized window
3232- Tools . SetFocusToGrid ( gridRecent , GetSelectedProjectIndex ( ) ) ;
3227+ Tools . SetFocusToGrid ( gridRecent , gridRecent . SelectedIndex ) ;
32333228 }
32343229
32353230 private void chkOverride40ProjectCount_Checked ( object sender , RoutedEventArgs e )
@@ -3308,6 +3303,26 @@ private void menuItemDownloadLinuxDedicatedServerModule_Click(object sender, Rou
33083303 Tools . DownloadAdditionalModules ( unity . Path , unity . Version , "Linux-Server" ) ;
33093304 }
33103305
3306+ private void tabControl_PreviewKeyDown ( object sender , KeyEventArgs e )
3307+ {
3308+ // if press up or down, while tab control is focused, move focus to grid
3309+ if ( e . Key == Key . Up || e . Key == Key . Down )
3310+ {
3311+ if ( tabControl . SelectedIndex == 0 )
3312+ {
3313+ Tools . SetFocusToGrid ( gridRecent , gridRecent . SelectedIndex ) ;
3314+ }
3315+ else if ( tabControl . SelectedIndex == 1 )
3316+ {
3317+ Tools . SetFocusToGrid ( dataGridUnitys , dataGridUnitys . SelectedIndex ) ;
3318+ }
3319+ else if ( tabControl . SelectedIndex == 2 )
3320+ {
3321+ Tools . SetFocusToGrid ( dataGridUpdates , dataGridUpdates . SelectedIndex ) ;
3322+ }
3323+ }
3324+ }
3325+
33113326 //private void BtnBrowseTemplateUnityPackagesFolder_Click(object sender, RoutedEventArgs e)
33123327 //{
33133328 // var folder = Tools.BrowseForOutputFolder("Select unitypackage Templates folder");
0 commit comments