File tree 1 file changed +5
-3
lines changed
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)
140
140
if ( proj == null ) return ;
141
141
if ( Directory . Exists ( proj . Path ) == false ) return ;
142
142
143
- Console . WriteLine ( "launch project " + proj . Title + " " + proj . Version ) ;
143
+ Console . WriteLine ( "launch project " + proj . Title + " " + proj . Version ) ;
144
144
145
145
// there is no assets path, probably we want to create new project then
146
146
var assetsFolder = Path . Combine ( proj . Path , "Assets" ) ;
@@ -663,10 +663,12 @@ public static string ReadCustomLaunchArguments(string projectPath, string launch
663
663
return results ;
664
664
}
665
665
666
- public static void SetFocusToGrid ( DataGrid targetGrid , int index = 0 )
666
+ public static void SetFocusToGrid ( DataGrid targetGrid , int index = - 1 )
667
667
{
668
- //e.Handled = true; // if enabled, we enter to first row initially
669
668
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
+
670
672
targetGrid . Focus ( ) ;
671
673
DataGridRow row = ( DataGridRow ) targetGrid . ItemContainerGenerator . ContainerFromIndex ( index ) ;
672
674
if ( row == null )
You can’t perform that action at this time.
0 commit comments