|
15 | 15 | using Microsoft.UI.Xaml.Media;
|
16 | 16 | using Microsoft.UI.Xaml.Navigation;
|
17 | 17 | using System;
|
| 18 | +using System.Globalization; |
18 | 19 | using System.Linq;
|
19 | 20 | using UWPToWinAppSDKUpgradeHelpers;
|
20 | 21 | using Windows.Foundation;
|
@@ -417,28 +418,34 @@ private async void ReloadItemIcons()
|
417 | 418 |
|
418 | 419 | private async void FileList_ItemTapped(object sender, TappedRoutedEventArgs e)
|
419 | 420 | {
|
| 421 | + var clickedItem = e.OriginalSource as FrameworkElement; |
420 | 422 | var ctrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
|
421 | 423 | var shiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down);
|
422 | 424 | var item = (e.OriginalSource as FrameworkElement)?.DataContext as ListedItem;
|
423 | 425 | if (item is null)
|
424 | 426 | return;
|
| 427 | + |
425 | 428 | // Skip code if the control or shift key is pressed or if the user is using multiselect
|
426 |
| - if (ctrlPressed || shiftPressed || AppModel.ShowSelectionCheckboxes) |
| 429 | + if |
| 430 | + ( |
| 431 | + ctrlPressed || |
| 432 | + shiftPressed || |
| 433 | + AppModel.ShowSelectionCheckboxes && !UserSettingsService.FoldersSettingsService.OpenItemsWithOneClick || |
| 434 | + clickedItem is Microsoft.UI.Xaml.Shapes.Rectangle |
| 435 | + ) |
427 | 436 | {
|
428 | 437 | e.Handled = true;
|
429 | 438 | return;
|
430 | 439 | }
|
431 | 440 |
|
432 | 441 | // Check if the setting to open items with a single click is turned on
|
433 |
| - if (item is not null |
434 |
| - && UserSettingsService.FoldersSettingsService.OpenItemsWithOneClick) |
| 442 | + if (UserSettingsService.FoldersSettingsService.OpenItemsWithOneClick) |
435 | 443 | {
|
436 | 444 | ResetRenameDoubleClick();
|
437 | 445 | _ = NavigationHelpers.OpenSelectedItems(ParentShellPageInstance, false);
|
438 | 446 | }
|
439 | 447 | else
|
440 | 448 | {
|
441 |
| - var clickedItem = e.OriginalSource as FrameworkElement; |
442 | 449 | if (clickedItem is TextBlock && ((TextBlock)clickedItem).Name == "ItemName")
|
443 | 450 | {
|
444 | 451 | CheckRenameDoubleClick(clickedItem?.DataContext);
|
|
0 commit comments