mirror of
https://github.com/redis/RedisDesktopManager.git
synced 2026-10-28 02:56:32 +08:00
Fix #3885: Clean up keys filter
This commit is contained in:
@@ -10,6 +10,7 @@ TreeView {
|
||||
id: root
|
||||
alternatingRowColors: false
|
||||
headerVisible: false
|
||||
focus: true
|
||||
|
||||
TableViewColumn {
|
||||
title: "item"
|
||||
@@ -34,7 +35,7 @@ TreeView {
|
||||
width: root.width - 20
|
||||
}
|
||||
|
||||
itemDelegate: Item {
|
||||
itemDelegate: FocusScope {
|
||||
id: itemRoot
|
||||
|
||||
Item {
|
||||
@@ -96,6 +97,10 @@ TreeView {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
onLoaded: {
|
||||
wrapper.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
||||
@@ -6,6 +6,14 @@ import "."
|
||||
RowLayout {
|
||||
id: root
|
||||
|
||||
focus: true
|
||||
|
||||
Keys.onPressed: {
|
||||
if (state == "filter" && event.key == Qt.Key_Escape) {
|
||||
state = "menu"
|
||||
}
|
||||
}
|
||||
|
||||
property var shortcuts: {
|
||||
'add': Qt.platform.os == "osx"? "Meta+N" : "Ctrl+N",
|
||||
'reload': Qt.platform.os == "osx"? "Meta+R" : "Ctrl+R",
|
||||
@@ -145,7 +153,10 @@ RowLayout {
|
||||
return connectionsManager.getMetadata(styleData.index, "filter")
|
||||
}
|
||||
|
||||
onAccepted: filterOk.setFilter()
|
||||
onAccepted: {
|
||||
filterOk.setFilter()
|
||||
focus = false
|
||||
}
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
|
||||
Reference in New Issue
Block a user