@@ -4332,6 +4332,8 @@ private void gridRecent_Drop(object sender, DragEventArgs e)
43324332 //MessageBox.Show("files: " + files.Length, "Information", MessageBoxButton.OK, MessageBoxImage.Information);
43334333
43344334 bool addedAny = false ;
4335+ string addedPath = null ;
4336+
43354337 // check if any of the files is a unity project (has Assets and ProjectSettings folder)
43364338 foreach ( var file in files )
43374339 {
@@ -4343,6 +4345,7 @@ private void gridRecent_Drop(object sender, DragEventArgs e)
43434345 if ( Directory . Exists ( assetsFolder ) == true && Directory . Exists ( projectSettingsFolder ) == true )
43444346 {
43454347 Tools . AddProjectToHistory ( file ) ;
4348+ addedPath = file ;
43464349 addedAny = true ;
43474350 }
43484351 else
@@ -4361,9 +4364,23 @@ private void gridRecent_Drop(object sender, DragEventArgs e)
43614364 // clear search, so can see added project
43624365 searchBoxProjects . SearchText = "" ;
43634366 RefreshRecentProjects ( ) ;
4364- // NOTE 0 works for sort-by-date only
4365- Tools . SetFocusToGrid ( gridRecent , 0 ) ;
43664367 SetStatus ( "Added project(s) with drag and drop.." ) ;
4368+
4369+ // find one of the added items
4370+ if ( addedPath != null )
4371+ {
4372+ for ( int i = 0 , len = gridRecent . Items . Count ; i < len ; i ++ )
4373+ {
4374+ var item = gridRecent . Items [ i ] as Project ;
4375+ if ( item != null && ( item . Path ?? "" ) . Replace ( '\\ ' , '/' ) == addedPath . Replace ( '\\ ' , '/' ) )
4376+ {
4377+ gridRecent . SelectedIndex = i ;
4378+ gridRecent . ScrollIntoView ( item ) ;
4379+ gridRecent . Focus ( ) ;
4380+ break ;
4381+ }
4382+ }
4383+ }
43674384 }
43684385 }
43694386
0 commit comments