Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 843 Lines • ▼ Show 20 Line(s) | 843 | if (currentIndex != -1 && dir.hasSelection() && currentItem) { | |||
---|---|---|---|---|---|
844 | dir.setSelected(positioner.map(currentIndex)); | 844 | dir.setSelected(positioner.map(currentIndex)); | ||
845 | dir.openContextMenu(currentItem.frame); | 845 | dir.openContextMenu(currentItem.frame); | ||
846 | } else { | 846 | } else { | ||
847 | // Otherwise let the containment handle it. | 847 | // Otherwise let the containment handle it. | ||
848 | event.accepted = false; | 848 | event.accepted = false; | ||
849 | } | 849 | } | ||
850 | } | 850 | } | ||
851 | 851 | | |||
852 | Keys.onEscapePressed: { | ||||
853 | if (!editor.targetItem) { | ||||
854 | dir.clearSelection(); | ||||
855 | } | ||||
856 | } | ||||
857 | | ||||
852 | Folder.ShortCut { | 858 | Folder.ShortCut { | ||
853 | Component.onCompleted: { | 859 | Component.onCompleted: { | ||
854 | installAsEventFilterFor(gridView); | 860 | installAsEventFilterFor(gridView); | ||
855 | } | 861 | } | ||
856 | 862 | | |||
857 | onDeleteFile: { | 863 | onDeleteFile: { | ||
858 | dir.deleteSelected(); | 864 | dir.deleteSelected(); | ||
859 | } | 865 | } | ||
▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines |