File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ internal set
9191 if ( value != selectedItems )
9292 {
9393 selectedItems = value ;
94- if ( selectedItems . Count == 0 )
94+ if ( selectedItems . Count == 0 || selectedItems [ 0 ] == null )
9595 {
9696 IsItemSelected = false ;
9797 SelectedItem = null ;
Original file line number Diff line number Diff line change @@ -176,8 +176,11 @@ public override void FocusSelectedItems()
176176
177177 public override void StartRenameItem ( )
178178 {
179- AllView . CurrentColumn = AllView . Columns [ 1 ] ;
180- AllView . BeginEdit ( ) ;
179+ if ( AllView . SelectedIndex != - 1 )
180+ {
181+ AllView . CurrentColumn = AllView . Columns [ 1 ] ;
182+ AllView . BeginEdit ( ) ;
183+ }
181184 }
182185
183186 private void ViewModel_PropertyChanged ( object sender , PropertyChangedEventArgs e )
Original file line number Diff line number Diff line change @@ -1115,17 +1115,17 @@ await FilesystemHelpers.DeleteItemsAsync(
11151115 break ;
11161116 } ;
11171117
1118- if ( CurrentPageType == typeof ( GridViewBrowser ) )
1118+ switch ( args . KeyboardAccelerator . Key )
11191119 {
1120- switch ( args . KeyboardAccelerator . Key )
1121- {
1122- case VirtualKey . F2 : //F2, rename
1120+ case VirtualKey . F2 : //F2, rename
1121+ if ( CurrentPageType == typeof ( GenericFileBrowser ) || CurrentPageType == typeof ( GridViewBrowser ) )
1122+ {
11231123 if ( ContentPage . IsItemSelected )
11241124 {
11251125 InteractionOperations . RenameItem_Click ( null , null ) ;
11261126 }
1127- break ;
1128- }
1127+ }
1128+ break ;
11291129 }
11301130 }
11311131
You can’t perform that action at this time.
0 commit comments