File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ public static void LaunchProject(Project proj)
140140 if ( proj == null ) return ;
141141 if ( Directory . Exists ( proj . Path ) == false ) return ;
142142
143- Console . WriteLine ( "launch project " + proj . Title + " " + proj . Version ) ;
143+ Console . WriteLine ( "launch project " + proj . Title + " " + proj . Version ) ;
144144
145145 // there is no assets path, probably we want to create new project then
146146 var assetsFolder = Path . Combine ( proj . Path , "Assets" ) ;
@@ -663,10 +663,12 @@ public static string ReadCustomLaunchArguments(string projectPath, string launch
663663 return results ;
664664 }
665665
666- public static void SetFocusToGrid ( DataGrid targetGrid , int index = 0 )
666+ public static void SetFocusToGrid ( DataGrid targetGrid , int index = - 1 )
667667 {
668- //e.Handled = true; // if enabled, we enter to first row initially
669668 if ( targetGrid . Items . Count < 1 ) return ;
669+ if ( index == - 1 && targetGrid . SelectedIndex > - 1 ) index = targetGrid . SelectedIndex ; // keep current row selected
670+ if ( index == - 1 ) index = 0 ;
671+
670672 targetGrid . Focus ( ) ;
671673 DataGridRow row = ( DataGridRow ) targetGrid . ItemContainerGenerator . ContainerFromIndex ( index ) ;
672674 if ( row == null )
You can’t perform that action at this time.
0 commit comments