Desktop: When the focus is lost, the rename will also be cancelled
This commit is contained in:
parent
ab343fb176
commit
4f57fa63b8
3 changed files with 12 additions and 1 deletions
|
@ -105,8 +105,10 @@ Item {
|
||||||
delegate: FolderGridItem {}
|
delegate: FolderGridItem {}
|
||||||
|
|
||||||
onActiveFocusChanged: {
|
onActiveFocusChanged: {
|
||||||
if (!activeFocus)
|
if (!activeFocus) {
|
||||||
|
_folderView.cancelRename()
|
||||||
dirModel.clearSelection()
|
dirModel.clearSelection()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
|
@ -214,6 +214,10 @@ GridView {
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: ScrollBar { }
|
||||||
|
|
||||||
|
FishUI.WheelHandler {
|
||||||
|
target: control
|
||||||
|
}
|
||||||
|
|
||||||
onPressXChanged: {
|
onPressXChanged: {
|
||||||
cPress = mapToItem(control.contentItem, pressX, pressY)
|
cPress = mapToItem(control.contentItem, pressX, pressY)
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,11 @@ ListView {
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar { }
|
ScrollBar.vertical: ScrollBar { }
|
||||||
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
||||||
|
FishUI.WheelHandler {
|
||||||
|
target: control
|
||||||
|
}
|
||||||
|
|
||||||
function rename() {
|
function rename() {
|
||||||
if (currentIndex !== -1) {
|
if (currentIndex !== -1) {
|
||||||
|
|
Loading…
Reference in a new issue